Date: Sat, 10 Jul 2004 13:54:23 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 56957 for review Message-ID: <200407101354.i6ADsNT4027226@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=56957 Change 56957 by davidxu@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"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407101354.i6ADsNT4027226>