PERFORCE change 94945 for review
John Baldwin
jhb at FreeBSD.org
Mon Apr 10 19:44:18 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=94945
Change 94945 by jhb at 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;
More information about the p4-projects
mailing list