summaryrefslogtreecommitdiff
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2003-05-01 07:29:25 +0000
committerDavid Xu <davidxu@FreeBSD.org>2003-05-01 07:29:25 +0000
commit1ecc645634806099557c4a5f32497028f6328224 (patch)
tree83c6ea1aec4bf55bf940670077947c4b00afe7a2 /sys/kern/kern_thread.c
parente4532a7511cb6bf1f68781a6af95d27fd8cef026 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index 4a3e92e8a39e..b2e842bf8d7e 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -1165,6 +1165,9 @@ thread_exit(void)
td->td_standin = NULL;
}
+ if (p->p_tracee == td)
+ p->p_tracee = 0;
+
cpu_thread_exit(td); /* XXXSMP */
/*
@@ -1945,7 +1948,6 @@ thread_suspend_check(int return_instead)
thr_exit1();
}
- mtx_assert(&Giant, MA_NOTOWNED);
/*
* When a thread suspends, it just
* moves to the processes's suspend queue
@@ -1957,10 +1959,12 @@ thread_suspend_check(int return_instead)
thread_unsuspend_one(p->p_singlethread);
}
}
+ DROP_GIANT();
PROC_UNLOCK(p);
p->p_stats->p_ru.ru_nivcsw++;
mi_switch();
mtx_unlock_spin(&sched_lock);
+ PICKUP_GIANT();
PROC_LOCK(p);
}
return (0);