summaryrefslogtreecommitdiff
path: root/kern/rtmutex_i.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2018-04-18 21:45:12 +0200
committerRichard Braun <rbraun@sceen.net>2018-04-19 01:45:43 +0200
commit8790d75d93c7e06b7b93c1078260aaf1e4ea25ca (patch)
tree478eb3eb2607f1312d7b4e64cab23f3bcb0268ee /kern/rtmutex_i.h
parent3640f94ee392b19de48360d2d026a7f581447049 (diff)
kern/atomic: remove shortcuts
These shortcuts just don't bring enough value.
Diffstat (limited to 'kern/rtmutex_i.h')
-rw-r--r--kern/rtmutex_i.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/kern/rtmutex_i.h b/kern/rtmutex_i.h
index 9d3689dd..64ff69a0 100644
--- a/kern/rtmutex_i.h
+++ b/kern/rtmutex_i.h
@@ -57,7 +57,7 @@ rtmutex_lock_fast(struct rtmutex *rtmutex)
owner = (uintptr_t)thread_self();
rtmutex_assert_owner_aligned(owner);
- return atomic_cas_acquire(&rtmutex->owner, 0, owner);
+ return atomic_cas(&rtmutex->owner, 0, owner, ATOMIC_ACQUIRE);
}
static inline uintptr_t
@@ -67,7 +67,7 @@ rtmutex_unlock_fast(struct rtmutex *rtmutex)
owner = (uintptr_t)thread_self();
rtmutex_assert_owner_aligned(owner);
- prev_owner = atomic_cas_release(&rtmutex->owner, owner, 0);
+ prev_owner = atomic_cas(&rtmutex->owner, owner, 0, ATOMIC_RELEASE);
assert((prev_owner & RTMUTEX_OWNER_MASK) == owner);
return prev_owner;
}