Date: Sat, 7 Aug 2004 04:44:37 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 59065 for review Message-ID: <200408070444.i774ibQa045193@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=59065 Change 59065 by davidxu@davidxu_alona on 2004/08/07 04:43:38 suspend system scope thread after leaving critical region. Affected files ... .. //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_kern.c#9 edit Differences ... ==== //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_kern.c#9 (text+ko) ==== @@ -937,8 +937,7 @@ } /* - * No current thread anymore, calling _get_curthread in UTS - * should dump core + * No current thread anymore */ _tcb_set(curkse->k_kcb, NULL); @@ -2541,7 +2540,11 @@ * 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); + } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408070444.i774ibQa045193>