PERFORCE change 59065 for review
David Xu
davidxu at FreeBSD.org
Fri Aug 6 21:44:38 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=59065
Change 59065 by davidxu at 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);
+ }
}
More information about the p4-projects
mailing list