summaryrefslogtreecommitdiff
path: root/kern/rtmutex.c
diff options
context:
space:
mode:
authorAgustina Arzille <avarzille@riseup.net>2017-07-21 00:49:39 +0200
committerRichard Braun <rbraun@sceen.net>2017-07-21 00:49:48 +0200
commit4278f99adcbcfbd52904c0d8809184afe091c958 (patch)
tree745aed92ca63047495bcecc3f8007dd48818405b /kern/rtmutex.c
parent4eaa58c85eec654eb8bf8e002b3f3a419f5ce16b (diff)
Rework mutex implementation selection
Diffstat (limited to 'kern/rtmutex.c')
-rw-r--r--kern/rtmutex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kern/rtmutex.c b/kern/rtmutex.c
index 6f639ddf..6909ce18 100644
--- a/kern/rtmutex.c
+++ b/kern/rtmutex.c
@@ -36,7 +36,7 @@ void
rtmutex_lock_slow(struct rtmutex *rtmutex)
{
struct turnstile *turnstile;
- uintptr_t owner, prev_owner;
+ uintptr_t owner, prev_owner; /* TODO Review names */
struct thread *thread;
uintptr_t bits;
@@ -64,6 +64,7 @@ rtmutex_lock_slow(struct rtmutex *rtmutex)
turnstile_own(turnstile);
if (turnstile_empty(turnstile)) {
+ /* TODO Review memory order */
prev_owner = atomic_swap_acquire(&rtmutex->owner, owner);
assert(prev_owner == (owner | bits));
}