summaryrefslogtreecommitdiffstats
path: root/sys/ia64/ia64/machdep.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-01-27 02:32:07 +0000
committermarcel <marcel@FreeBSD.org>2010-01-27 02:32:07 +0000
commit0e7685cf237a34c682a1ba0440a703141430afd8 (patch)
tree976c3617053e6076cb604afccc49f55362f287f7 /sys/ia64/ia64/machdep.c
parent9b81a2fd8de8a8125e33b82de8bc199e4d15f54a (diff)
downloadFreeBSD-src-0e7685cf237a34c682a1ba0440a703141430afd8.zip
FreeBSD-src-0e7685cf237a34c682a1ba0440a703141430afd8.tar.gz
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
Diffstat (limited to 'sys/ia64/ia64/machdep.c')
-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 fd5d781..8bebde2 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)
OpenPOWER on IntegriCloud