From owner-p4-projects Sat Jun 22 20:16:45 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E8FD337B405; Sat, 22 Jun 2002 20:16:37 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 34AD837B404 for ; Sat, 22 Jun 2002 20:16:37 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5N3Gbf17341 for perforce@freebsd.org; Sat, 22 Jun 2002 20:16:37 -0700 (PDT) (envelope-from julian@freebsd.org) Date: Sat, 22 Jun 2002 20:16:37 -0700 (PDT) Message-Id: <200206230316.g5N3Gbf17341@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer Subject: PERFORCE change 13301 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=13301 Change 13301 by julian@julian_ref on 2002/06/22 20:15:41 fix a sched-lock test and remove debugging Matt accidentally included. Affected files ... ... //depot/projects/kse/sys/kern/kern_synch.c#69 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_synch.c#69 (text+ko) ==== @@ -421,7 +421,6 @@ * flag the mutex is not entered before returning. */ -struct thread *TD1; int msleep(ident, mtx, priority, wmesg, timo) @@ -458,7 +457,6 @@ and not the exiting thread. */ if ((p->p_flag & P_WEXIT) && catch && p->p_singlethread != td) return (EINTR); - TD1 = NULL; if (td->td_mailbox && (!(td->td_flags & TDF_INMSLEEP))) { /* * If we have no queued work to do, then @@ -466,17 +464,16 @@ * We don't need to upcall now, just make it and * queue it. */ + mtx_lock_spin(&sched_lock); if (TAILQ_FIRST(&td->td_ksegrp->kg_runq) == NULL) { - TD1 = td; /* Don't recurse here! */ - mtx_lock_spin(&sched_lock); KASSERT((td->td_kse->ke_state == KES_RUNNING), ("msleep: kse stateX?")); td->td_flags |= TDF_INMSLEEP; thread_schedule_upcall(td, td->td_kse); td->td_flags &= ~TDF_INMSLEEP; KASSERT((td->td_kse->ke_state == KES_RUNNING), ("msleep: kse stateY?")); - mtx_unlock_spin(&sched_lock); } + mtx_unlock_spin(&sched_lock); } KASSERT((td->td_kse != NULL), ("msleep: NULL KSE2?")); KASSERT((td->td_kse->ke_state == KES_RUNNING), To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message