From c3b98db091b192a2e4333df74ea6da2a6ea90d26 Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Sun, 14 Jul 2002 03:43:33 +0000 Subject: Thinking about it I came to the conclusion that the KSE states were incorrectly formulated. The correct states should be: IDLE: On the idle KSE list for that KSEG RUNQ: Linked onto the system run queue. THREAD: Attached to a thread and slaved to whatever state the thread is in. This means that most places where we were adjusting kse state can go away as it is just moving around because the thread is.. The only places we need to adjust the KSE state is in transition to and from the idle and run queues. Reviewed by: jhb@freebsd.org --- sys/kern/init_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/kern/init_main.c') diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index da1b843845f8..6817bdc87a93 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -342,7 +342,7 @@ proc0_init(void *dummy __unused) td->td_base_pri = PUSER; td->td_kse = ke; /* XXXKSE */ ke->ke_oncpu = 0; - ke->ke_state = KES_RUNNING; + ke->ke_state = KES_THREAD; ke->ke_thread = td; /* proc_linkup puts it in the idle queue, that's not what we want. */ TAILQ_REMOVE(&kg->kg_iq, ke, ke_kgrlist); -- cgit v1.2.3