From b7f2bfbb715a61fc1ffc24b07e63afab32fcaedb Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 26 Sep 2006 15:12:05 +0000 Subject: [PATCH] Create idle thread with minimum priority. Suggested by Godmar Back. --- src/threads/thread.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 (); -- 2.30.2