X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Fthreads%2Fthread.c;h=938d7f87d6b0b296e676ca971928a6ba0823fd27;hp=ba1cae365f711f44474d6206bffb4e4ca25ccddc;hb=689fb08ce1061297cec4264aeb32464ec182fcf3;hpb=f35d56069db7eb1bc09f48f7f40a594718611f95 diff --git a/src/threads/thread.c b/src/threads/thread.c index ba1cae3..938d7f8 100644 --- a/src/threads/thread.c +++ b/src/threads/thread.c @@ -109,15 +109,10 @@ thread_init (void) void thread_start (void) { - /* Create the idle thread with maximum priority. This ensures - that it will be scheduled soon after interrupts are enabled. - The idle thread will block almost immediately upon - scheduling, and subsequently it will never appear on the - ready list, so the priority here is otherwise - unimportant. */ + /* Create the idle thread. */ struct semaphore idle_started; sema_init (&idle_started, 0); - thread_create ("idle", PRI_MAX, idle, &idle_started); + thread_create ("idle", PRI_MIN, idle, &idle_started); /* Start preemptive thread scheduling. */ intr_enable ();