summaryrefslogtreecommitdiff
path: root/sys/kern/kern_switch.c
diff options
context:
space:
mode:
authorStephan Uphoff <ups@FreeBSD.org>2005-05-23 23:01:53 +0000
committerStephan Uphoff <ups@FreeBSD.org>2005-05-23 23:01:53 +0000
commitd13ec71369b40fa8ddbfa741c81b8914fd708a45 (patch)
tree0854fe6da58795b42d05ee82407cc8db7a5d0ca3 /sys/kern/kern_switch.c
parent64b5fbaa04a76f488c9a98b1c38b34292c99623c (diff)
Notes
Diffstat (limited to 'sys/kern/kern_switch.c')
-rw-r--r--sys/kern/kern_switch.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c
index 530305c139b6..fe1c382a8b9c 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);
}