diff options
author | ups <ups@FreeBSD.org> | 2005-05-23 23:01:53 +0000 |
---|---|---|
committer | ups <ups@FreeBSD.org> | 2005-05-23 23:01:53 +0000 |
commit | acfce18a2af057f945e45381ea2bc73622629c39 (patch) | |
tree | 0854fe6da58795b42d05ee82407cc8db7a5d0ca3 /sys/kern/kern_switch.c | |
parent | d8a59510c5b18aa8c2da8bfd45fa2021257d94fb (diff) | |
download | FreeBSD-src-acfce18a2af057f945e45381ea2bc73622629c39.zip FreeBSD-src-acfce18a2af057f945e45381ea2bc73622629c39.tar.gz |
Use low level constructs borrowed from interrupt threads to wait for
work in proc0.
Remove the TDP_WAKEPROC0 workaround.
Diffstat (limited to 'sys/kern/kern_switch.c')
-rw-r--r-- | sys/kern/kern_switch.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 530305c..fe1c382 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -593,15 +593,9 @@ critical_exit(void) td = curthread; KASSERT(td->td_critnest != 0, ("critical_exit: td_critnest == 0")); +#ifdef PREEMPTION if (td->td_critnest == 1) { - if (td->td_pflags & TDP_WAKEPROC0) { - td->td_pflags &= ~TDP_WAKEPROC0; - wakeup(&proc0); - } - td->td_critnest = 0; - -#ifdef PREEMPTION mtx_assert(&sched_lock, MA_NOTOWNED); if (td->td_owepreempt) { td->td_critnest = 1; @@ -610,12 +604,11 @@ critical_exit(void) mi_switch(SW_INVOL, NULL); mtx_unlock_spin(&sched_lock); } - + } else #endif - - } else { td->td_critnest--; - } + + CTR4(KTR_CRITICAL, "critical_exit by thread %p (%ld, %s) to %d", td, (long)td->td_proc->p_pid, td->td_proc->p_comm, td->td_critnest); } |