diff options
author | davidxu <davidxu@FreeBSD.org> | 2008-10-15 06:31:37 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2008-10-15 06:31:37 +0000 |
commit | 5068f6dcf0f3c2ae8be0b0774cd1d74f11085fbd (patch) | |
tree | b5ea5e6ee198214fb2b60f739b585b03f37900b2 /sys/kern/kern_exit.c | |
parent | e5b69cb78e39e1043228664f5667e46f361af000 (diff) | |
download | FreeBSD-src-5068f6dcf0f3c2ae8be0b0774cd1d74f11085fbd.zip FreeBSD-src-5068f6dcf0f3c2ae8be0b0774cd1d74f11085fbd.tar.gz |
Move per-thread userland debugging flags into seperated field,
this eliminates some problems of locking, e.g, a thread lock is needed
but can not be used at that time. Only the process lock is needed now
for new field.
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index e956cdf..6ebe032 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -438,7 +438,11 @@ exit1(struct thread *td, int rv) * since their existence means someone is screwing up. */ if (q->p_flag & P_TRACED) { + struct thread *temp; + q->p_flag &= ~(P_TRACED | P_STOPPED_TRACE); + FOREACH_THREAD_IN_PROC(q, temp) + temp->td_dbgflags &= ~TDB_SUSPEND; psignal(q, SIGKILL); } PROC_UNLOCK(q); |