Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 2002 15:41:36 -0700 (PDT)
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 13540 for review
Message-ID:  <200206282241.g5SMfarv032580@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206282241.g5SMfarv032580>