From owner-p4-projects@FreeBSD.ORG Sat Jul 10 14:18:55 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1439916A4D6; Sat, 10 Jul 2004 14:18:55 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4C9E16A4CF for ; Sat, 10 Jul 2004 14:18:54 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1A5743D2F for ; Sat, 10 Jul 2004 14:18:54 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i6AEIsZW027830 for ; Sat, 10 Jul 2004 14:18:54 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6AEIs9c027827 for perforce@freebsd.org; Sat, 10 Jul 2004 14:18:54 GMT (envelope-from davidxu@freebsd.org) Date: Sat, 10 Jul 2004 14:18:54 GMT Message-Id: <200407101418.i6AEIs9c027827@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 56961 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 14:18:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=56961 Change 56961 by davidxu@davidxu_alona on 2004/07/10 14:18:38 Add a comment. Affected files ... .. //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_priority_queue.c#3 edit Differences ... ==== //depot/projects/davidxu_ksedbg/src/lib/libpthread/thread/thr_priority_queue.c#3 (text+ko) ==== @@ -271,6 +271,16 @@ /* Mark the list as not being in the queue: */ pql->pl_queued = 0; } else { + /* + * note there may be a suspension event during this + * test, If TMDF_DONOTRUNUSER is set after we tested it, + * we will run the thread, this seems be a problem, + * fortunatly, when we are being debugged, all context + * switch will be done by kse_switchin, that is a syscall, + * kse_switchin will check the flag again, the thread + * will be returned via upcall, so next time, UTS won't + * run the thread. + */ while (pthread != NULL && !THR_IN_CRITICAL(pthread) && (pthread->tcb->tcb_tmbx.tm_dflags & TMDF_DONOTRUNUSER)) {