diff options
| author | David Xu <davidxu@FreeBSD.org> | 2004-08-08 22:42:11 +0000 |
|---|---|---|
| committer | David Xu <davidxu@FreeBSD.org> | 2004-08-08 22:42:11 +0000 |
| commit | 78f687539abca73a1b8d0a53086b991df21f8b78 (patch) | |
| tree | 31aebd99a2651a61a9636299dd7b4c28d721dd85 /lib | |
| parent | 62f9a9e92573147317f071b93bede8b7cb84812d (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libkse/thread/thr_kern.c | 10 | ||||
| -rw-r--r-- | lib/libpthread/thread/thr_kern.c | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index ddcae89efbe4..e29f98570570 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/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); + } } diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index ddcae89efbe4..e29f98570570 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); + } } |
