From owner-p4-projects Fri Jun 28 15:50: 6 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CD85C37B412; Fri, 28 Jun 2002 15:49:13 -0700 (PDT) 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 1AFD137B408 for ; Fri, 28 Jun 2002 15:49:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92CB7440CF for ; Fri, 28 Jun 2002 15:41:37 -0700 (PDT) (envelope-from julian@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g5SMfbJU032586 for ; Fri, 28 Jun 2002 15:41:37 -0700 (PDT) (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g5SMfarv032580 for perforce@freebsd.org; Fri, 28 Jun 2002 15:41:36 -0700 (PDT) Date: Fri, 28 Jun 2002 15:41:36 -0700 (PDT) Message-Id: <200206282241.g5SMfarv032580@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer Subject: PERFORCE change 13540 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=13540 Change 13540 by julian@julian_ref on 2002/06/28 15:40:48 tidy up a bit Affected files ... .. //depot/projects/kse/sys/kern/kern_thread.c#81 edit .. //depot/projects/kse/sys/kern/subr_trap.c#73 edit Differences ... ==== //depot/projects/kse/sys/kern/kern_thread.c#81 (text+ko) ==== @@ -421,6 +421,13 @@ /* * The extra work we go through if we are a threaded process when we * return to userland + * + * If we are a KSE process and returning to user mode, check for + * extra work to do before we return (e.g. for more syscalls + * to complete first). If we were in a critical section, we should + * just return to let it finish. Same if we were in the UTS (in + * which case we will have no thread mailbox registered). The only + * traps we suport will have set the mailbox. We will clear it here. */ int thread_userret(struct proc *p, struct ksegrp *kg, struct kse *ke, ==== //depot/projects/kse/sys/kern/subr_trap.c#73 (text+ko) ==== @@ -104,18 +104,16 @@ } /* - * If we are a KSE process and returning to user mode, check for - * extra work to do before we return (e.g. for more syscalls - * to complete first). If we were in a critical section, we should - * just return to let it finish. Same if we were in the UTS (in - * which case we will have no thread mailbox registered). The only - * traps we suport will have set the mailbox. We will clear it here. - * We also need to check to see if we have to exit or wait due to a - * single threading requirement. + * We need to check to see if we have to exit or wait due to a + * single threading requirement or some other STOP condition. */ PROC_LOCK(p); thread_suspend_check(0); /* Can suspend or kill */ PROC_UNLOCK(p); + + /* + * DO special thread processing, e.g. upcall tweaking and such + */ if (p->p_flag & P_KSES) { thread_userret(p, kg, ke, td, frame); /* printf("KSE thread returned"); */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message