summaryrefslogtreecommitdiff
path: root/sys/kern/subr_trap.c
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>2002-07-10 06:40:22 +0000
committerJulian Elischer <julian@FreeBSD.org>2002-07-10 06:40:22 +0000
commitad22735e3f427b9771996664a5a558d84fbc6cf2 (patch)
tree23ae12a99a38891ba73d05183c75ef839bb0eb74 /sys/kern/subr_trap.c
parentbad0e574caba7fdecb185fc08dbd3e9b6c885645 (diff)
Notes
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r--sys/kern/subr_trap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 027aa9c7f34b..85edeedb8077 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -106,10 +106,14 @@ userret(td, frame, oticks)
/*
* We need to check to see if we have to exit or wait due to a
* single threading requirement or some other STOP condition.
+ * Don't bother doing all the work if the stop bits are not set
+ * at this time.. If we miss it, we miss it.. no big deal.
*/
- PROC_LOCK(p);
- thread_suspend_check(0); /* Can suspend or kill */
- PROC_UNLOCK(p);
+ if (P_SHOULDSTOP(p)) {
+ PROC_LOCK(p);
+ thread_suspend_check(0); /* Can suspend or kill */
+ PROC_UNLOCK(p);
+ }
/*
* DO special thread processing, e.g. upcall tweaking and such