aboutsummaryrefslogtreecommitdiff
path: root/sys/ia64
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2010-01-27 02:32:07 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2010-01-27 02:32:07 +0000
commit9d908720aae724e59860e77360a79c4c995825e2 (patch)
tree976c3617053e6076cb604afccc49f55362f287f7 /sys/ia64
parent5c335c81b3279e8a93ff0d645f3e858367c88ec4 (diff)
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
Notes
svn path=/head/; revision=203054
Diffstat (limited to 'sys/ia64')
-rw-r--r--sys/ia64/ia64/machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c
index fd5d781ca7eb..8bebde2d5cc2 100644
--- a/sys/ia64/ia64/machdep.c
+++ b/sys/ia64/ia64/machdep.c
@@ -442,7 +442,7 @@ cpu_switch(struct thread *old, struct thread *new, struct mtx *mtx)
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)