Fix Bug in fd_counter initialisation when USERPROG is not defined
This commit is contained in:
@@ -254,7 +254,10 @@ thread_create (const char *name, int priority,
|
||||
tid = t->tid = allocate_tid ();
|
||||
init_process_result (t);
|
||||
|
||||
#ifdef USERPROG
|
||||
#ifdef USERPROG
|
||||
/* Initialize the thread's file descriptor table. */
|
||||
t->fd_counter = MINIMUM_USER_FD;
|
||||
|
||||
if (!hash_init (&t->open_files, fd_hash, fd_less, NULL)
|
||||
|| !hash_init (&t->child_results, process_result_hash,
|
||||
process_result_less, t))
|
||||
@@ -704,7 +707,6 @@ init_thread (struct thread *t, const char *name, int nice, int priority,
|
||||
t->recent_cpu = recent_cpu;
|
||||
t->priority = t->base_priority;
|
||||
|
||||
t->fd_counter = MINIMUM_USER_FD;
|
||||
t->exit_status = -1;
|
||||
|
||||
old_level = intr_disable ();
|
||||
|
||||
Reference in New Issue
Block a user