From owner-p4-projects@FreeBSD.ORG Sun Jul 18 03:28:58 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD62316A4D0; Sun, 18 Jul 2004 03:28:57 +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 B898016A4CE for ; Sun, 18 Jul 2004 03:28:57 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF96A43D54 for ; Sun, 18 Jul 2004 03:28:57 +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 i6I3SvM2072137 for ; Sun, 18 Jul 2004 03:28:57 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6I3SvAA072134 for perforce@freebsd.org; Sun, 18 Jul 2004 03:28:57 GMT (envelope-from davidxu@freebsd.org) Date: Sun, 18 Jul 2004 03:28:57 GMT Message-Id: <200407180328.i6I3SvAA072134@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 57583 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: Sun, 18 Jul 2004 03:28:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=57583 Change 57583 by davidxu@davidxu_alona on 2004/07/18 03:28:41 Call thread_user_enter() in ast(), so thread_userret needn't call it. Affected files ... .. //depot/projects/davidxu_ksedbg/src/sys/kern/kern_kse.c#8 edit .. //depot/projects/davidxu_ksedbg/src/sys/kern/subr_trap.c#5 edit Differences ... ==== //depot/projects/davidxu_ksedbg/src/sys/kern/kern_kse.c#8 (text+ko) ==== @@ -373,7 +373,8 @@ error = copyout(&sigset, &ku->ku_mailbox->km_sigscaught, sizeof(sigset)); } else { - if (! kg->kg_completed && !(ku->ku_flags & KUF_DOUPCALL)) { + if (((ku->ku_mflags & KMF_NOCOMPLETED) || + !kg->kg_completed) && !(ku->ku_flags & KUF_DOUPCALL)) { kg->kg_upsleeps++; td->td_kflags |= TDK_KSEREL; error = msleep(&kg->kg_completed, &p->p_mtx, @@ -424,7 +425,7 @@ kg = td->td_ksegrp; if (kg->kg_upsleeps) { mtx_unlock_spin(&sched_lock); - wakeup_one(&kg->kg_completed); + wakeup(&kg->kg_completed); PROC_UNLOCK(p); return (0); } @@ -1135,18 +1136,6 @@ td->td_pflags &= ~TDP_USTATCLOCK; } -#if 0 - /* - * Check if we should unbind and schedule upcall - * after returned from interrupt or etcs, this - * is usually true when process is being debugged. - */ - if (td->td_mailbox == NULL && ku != NULL && - !(td->td_pflags & TDP_UPCALLING) && - (kg->kg_completed || ku->ku_flags & KUF_DOUPCALL)) - thread_user_enter(p, td); -#endif - uts_crit = (td->td_mailbox == NULL); /* * Optimisation: @@ -1190,7 +1179,7 @@ * XXXKSE Maybe wake all of them up. */ if (kg->kg_upsleeps) - wakeup_one(&kg->kg_completed); + wakeup(&kg->kg_completed); mtx_lock_spin(&sched_lock); thread_stopped(p); thread_exit(); @@ -1336,7 +1325,6 @@ PROC_LOCK_ASSERT(p, MA_OWNED); mtx_assert(&sched_lock, MA_OWNED); - return; if (!(p->p_flag & P_SA)) return; ==== //depot/projects/davidxu_ksedbg/src/sys/kern/subr_trap.c#5 (text+ko) ====