summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_lock.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-04-13 01:21:56 +0000
committerattilio <attilio@FreeBSD.org>2008-04-13 01:21:56 +0000
commit5a49f99cf6d02cec123b5d9a859677c5ab42a0b3 (patch)
tree2875f7429f45428189f14bb6cdbd35a4a454eec2 /sys/kern/kern_lock.c
parentab58eeddbc23fa0c128e4048877c6a20acbd3908 (diff)
downloadFreeBSD-src-5a49f99cf6d02cec123b5d9a859677c5ab42a0b3.zip
FreeBSD-src-5a49f99cf6d02cec123b5d9a859677c5ab42a0b3.tar.gz
Use a "rel" memory barrier for disowning the lock as it cames from an
exclusive locking operation.
Diffstat (limited to 'sys/kern/kern_lock.c')
-rw-r--r--sys/kern/kern_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c
index 856642d..6653535 100644
--- a/sys/kern/kern_lock.c
+++ b/sys/kern/kern_lock.c
@@ -876,7 +876,7 @@ _lockmgr_disown(struct lock *lk, const char *file, int line)
*/
for (;;) {
x = lk->lk_lock & LK_ALL_WAITERS;
- if (atomic_cmpset_ptr(&lk->lk_lock, tid | x,
+ if (atomic_cmpset_rel_ptr(&lk->lk_lock, tid | x,
LK_KERNPROC | x))
return;
cpu_spinwait();
OpenPOWER on IntegriCloud