diff options
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/thread/thr_kern.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index ddcae89..e29f985 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); + } } |