diff options
author | jhb <jhb@FreeBSD.org> | 2002-07-12 18:34:22 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-07-12 18:34:22 +0000 |
commit | 91bb8201eeae731e6d8b345d9d056ebc17c2d781 (patch) | |
tree | 33a8ab6acd4539515cf2c39bfebdda1839199e8a /sys/kern/kern_switch.c | |
parent | ed7e4d6c5b6f82c819d9cda7df9eb9e3406f43a5 (diff) | |
download | FreeBSD-src-91bb8201eeae731e6d8b345d9d056ebc17c2d781.zip FreeBSD-src-91bb8201eeae731e6d8b345d9d056ebc17c2d781.tar.gz |
Set the thread state of the newly chosen to run thread to TDS_RUNNING in
choosethread() in MI C code instead of doing it in in assembly in all the
various cpu_switch() functions. This fixes problems on ia64 and sparc64.
Reviewed by: julian, peter, benno
Tested on: i386, alpha, sparc64
Diffstat (limited to 'sys/kern/kern_switch.c')
-rw-r--r-- | sys/kern/kern_switch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index b6ae79d..348a521b8 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -155,11 +155,10 @@ choosethread(void) } else { /* Pretend the idle thread was on the run queue. */ td = PCPU_GET(idlethread); - /* Simulate that it was on the run queue */ - td->td_state = TDS_RUNQ; td->td_kse->ke_state = KES_UNQUEUED; CTR1(KTR_RUNQ, "choosethread: td=%p (idle)", td); } + td->td_state = TDS_RUNNING; return (td); } |