PERFORCE change 56957 for review
David Xu
davidxu at FreeBSD.org
Sat Jul 10 06:54:24 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=56957
Change 56957 by davidxu at davidxu_alona on 2004/07/10 13:53:47
Check TDF_DBSUSPEND flag in thread_suspend_check(), the flag
is set by debugger when it wants to suspend the thread.
Affected files ...
.. //depot/projects/davidxu_ksedbg/src/sys/kern/kern_thread.c#3 edit
Differences ...
==== //depot/projects/davidxu_ksedbg/src/sys/kern/kern_thread.c#3 (text+ko) ====
@@ -870,6 +870,8 @@
td2->td_flags |= TDF_ASTPENDING;
if (TD_IS_INHIBITED(td2)) {
if (force_exit == SINGLE_EXIT) {
+ if (td->td_flags & TDF_DBSUSPEND)
+ td->td_flags &= ~TDF_DBSUSPEND;
if (TD_IS_SUSPENDED(td2)) {
thread_unsuspend_one(td2);
}
@@ -969,7 +971,8 @@
p = td->td_proc;
mtx_assert(&Giant, MA_NOTOWNED);
PROC_LOCK_ASSERT(p, MA_OWNED);
- while (P_SHOULDSTOP(p)) {
+ while (P_SHOULDSTOP(p) ||
+ ((p->p_flag & P_TRACED) && (td->td_flags & TDF_DBSUSPEND))) {
if (P_SHOULDSTOP(p) == P_STOPPED_SINGLE) {
KASSERT(p->p_singlethread != NULL,
("singlethread not set"));
More information about the p4-projects
mailing list