diff options
author | julian <julian@FreeBSD.org> | 2002-07-10 06:40:22 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-07-10 06:40:22 +0000 |
commit | acb01acb4e202b9d426d03b092d6078a1fed6215 (patch) | |
tree | 23ae12a99a38891ba73d05183c75ef839bb0eb74 /sys/kern/subr_trap.c | |
parent | bad07578ef190024fc0b67bd2d8047e51a642d5e (diff) | |
download | FreeBSD-src-acb01acb4e202b9d426d03b092d6078a1fed6215.zip FreeBSD-src-acb01acb4e202b9d426d03b092d6078a1fed6215.tar.gz |
Don't slow every syscall and trap by doing locks and stuff if the
'stop' bits are not set. This is a temporary thing.. I think this code probably
needs to be rewritten anyhow.
Diffstat (limited to 'sys/kern/subr_trap.c')
-rw-r--r-- | sys/kern/subr_trap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 027aa9c..85edeed 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 |