Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jan 2004 14:23:32 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 46158 for review
Message-ID:  <200401292223.i0TMNW8H023027@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=46158

Change 46158 by jhb@jhb_slimer on 2004/01/29 14:22:41

	Make this less messy.

Affected files ...

.. //depot/projects/smpng/sys/kern/kern_synch.c#63 edit

Differences ...

==== //depot/projects/smpng/sys/kern/kern_synch.c#63 (text+ko) ====

@@ -593,18 +593,16 @@
 	sx_slock(&allproc_lock);
 	nrun = 0;
 	FOREACH_PROC_IN_SYSTEM(p) {
+		if ((p->p_flag & P_NOLOAD) != 0)
+			continue;
 		FOREACH_THREAD_IN_PROC(p, td) {
 			switch (td->td_state) {
 			case TDS_RUNQ:
 			case TDS_RUNNING:
-				if ((p->p_flag & P_NOLOAD) != 0)
-					goto nextproc;
 				nrun++; /* XXXKSE */
 			default:
 				break;
 			}
-nextproc:
-			continue;
 		}
 	}
 	sx_sunlock(&allproc_lock);



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