svn commit: r203054 - head/sys/ia64/ia64
Marcel Moolenaar
marcel at FreeBSD.org
Wed Jan 27 02:32:08 UTC 2010
Author: marcel
Date: Wed Jan 27 02:32:07 2010
New Revision: 203054
URL: http://svn.freebsd.org/changeset/base/203054
Log:
In cpu_switch(), use an atomic operation to set the td_lock
of the old thread to the mutex that's passed.
Pointed out by: attilio, jhb
Modified:
head/sys/ia64/ia64/machdep.c
Modified: head/sys/ia64/ia64/machdep.c
==============================================================================
--- head/sys/ia64/ia64/machdep.c Wed Jan 27 00:34:52 2010 (r203053)
+++ head/sys/ia64/ia64/machdep.c Wed Jan 27 02:32:07 2010 (r203054)
@@ -442,7 +442,7 @@ cpu_switch(struct thread *old, struct th
if (PCPU_GET(fpcurthread) == old)
old->td_frame->tf_special.psr |= IA64_PSR_DFH;
if (!savectx(oldpcb)) {
- old->td_lock = mtx;
+ atomic_store_rel_ptr(&old->td_lock, mtx);
#if defined(SCHED_ULE) && defined(SMP)
/* td_lock is volatile */
while (new->td_lock == &blocked_lock)
More information about the svn-src-head
mailing list