diff options
author | davidxu <davidxu@FreeBSD.org> | 2004-08-08 22:42:11 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2004-08-08 22:42:11 +0000 |
commit | be9db1f7cb124c010333e8999a1e34d600b39974 (patch) | |
tree | 31aebd99a2651a61a9636299dd7b4c28d721dd85 /lib/libpthread | |
parent | 380ac81517b0d00d46818627bf188eafc46044ef (diff) | |
download | FreeBSD-src-be9db1f7cb124c010333e8999a1e34d600b39974.zip FreeBSD-src-be9db1f7cb124c010333e8999a1e34d600b39974.tar.gz |
Check debugger suspending flag for system scope thread.
Reviewed by: deischen
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/thread/thr_kern.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index ddcae89..e29f985 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -2539,7 +2539,11 @@ _thr_debug_check_yield(struct pthread *curthread) * is cleared by debugger, the flag will be cleared in next * suspension event. */ - if ((curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) == 0 && - !DBG_CAN_RUN(curthread)) - _thr_sched_switch(curthread); + if (!DBG_CAN_RUN(curthread)) { + if ((curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) == 0) + _thr_sched_switch(curthread); + else + kse_thr_interrupt(&curthread->tcb->tcb_tmbx, + KSE_INTR_DBSUSPEND, 0); + } } |