Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2002 08:20:09 -0700 (PDT)
From:      Julian Elischer <julian@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 12655 for review
Message-ID:  <200206101520.g5AFK9G59867@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12655

Change 12655 by julian@julian_jules1 on 2002/06/10 08:19:58

	more fixes to suspension

Affected files ...

... //depot/projects/kse/sys/kern/kern_thread.c#60 edit

Differences ...

==== //depot/projects/kse/sys/kern/kern_thread.c#60 (text+ko) ====

@@ -196,14 +196,19 @@
 		if (kg != NULL)
 			TAILQ_REMOVE(&kg->kg_threads, td, td_kglist);
 		p->p_numthreads--;
+#if 0
 		if (P_SHOULDSTOP(p) == P_STOPPED_SNGL) {
-			if (p->p_numthreads ==
-			    ((p->p_flag & P_SINGLE_EXIT) ? 1 :
-				(p->p_suspcount + 1))) {
+			if (p->p_numthreads == ((p->p_flag & P_SINGLE_EXIT) ?
+			    1 : p->p_suspcount)) {
+				TAILQ_REMOVE(&p->p_suspended,
+				    p->p_singlethread, td_runq);
 				setrunqueue(p->p_singlethread);
-				p->p_singlethread = NULL;
+				p->suspcount--;
 			}
 		}
+#else
+		thread_unsuspend(p);	/* see if it is there yet */
+#endif
 	}
 	if (kg != NULL)
 		kg->kg_numthreads--;
@@ -434,6 +439,7 @@
 				break;
 			/* etc. XXXKSE */
 			default:
+				;
 			}
 		}
 		/*

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?200206101520.g5AFK9G59867>