Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Apr 2006 19:44:16 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 94945 for review
Message-ID:  <200604101944.k3AJiGIZ062980@repoman.freebsd.org>

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

Change 94945 by jhb@jhb_slimer on 2006/04/10 19:44:00

	Reduce diff with CVS.

Affected files ...

.. //depot/projects/smpng/sys/kern/kern_mutex.c#122 edit

Differences ...

==== //depot/projects/smpng/sys/kern/kern_mutex.c#122 (text+ko) ====

@@ -455,7 +455,7 @@
     int line)
 {
 #if defined(SMP) && !defined(NO_ADAPTIVE_MUTEXES)
-	struct thread *owner;
+	volatile struct thread *owner;
 #endif
 	uintptr_t v;
 #ifdef KTR
@@ -551,16 +551,8 @@
 		if (m != &Giant && TD_IS_RUNNING(owner)) {
 #endif
 			turnstile_release(&m->mtx_object);
-
-			/*
-			 * Expanded TD_IS_RUNNING so that we could force
-			 * the compiler to not cache owner->td_state.
-			 * Otherwise, we wouldn't notice when the owning
-			 * thread stopped running.
-			 */
 			while (mtx_rawowner(m) == owner &&
-			    ((volatile struct thread *)owner)->td_state ==
-			    TDS_RUNNING) {
+			    TD_IS_RUNNING(owner)) {
 				cpu_spinwait();
 			}
 			continue;



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