From: Ben Pfaff Date: Tue, 26 Sep 2006 15:12:05 +0000 (+0000) Subject: Create idle thread with minimum priority. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=689fb08ce1061297cec4264aeb32464ec182fcf3;p=pintos-anon Create idle thread with minimum priority. Suggested by Godmar Back. --- 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 ();