summaryrefslogtreecommitdiff
path: root/kern/rtmutex.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-04-29 18:11:05 +0200
committerRichard Braun <rbraun@sceen.net>2017-04-29 18:11:05 +0200
commit6ba94ce79c8477758dd440d3563ffd4dd88883df (patch)
tree0de3dc706ea41e88bd367cdfefdf8cecfff59e10 /kern/rtmutex.h
parent361ad2e7608cc769331ed6620ab2adbb715d2850 (diff)
kern/rtmutex: fix unlock
Commit 42b089048fc0d3e67fa10cb411767afa161c7222 was apparently incomplete.
Diffstat (limited to 'kern/rtmutex.h')
-rw-r--r--kern/rtmutex.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/kern/rtmutex.h b/kern/rtmutex.h
index e5cb5e55..f64274d7 100644
--- a/kern/rtmutex.h
+++ b/kern/rtmutex.h
@@ -100,11 +100,9 @@ rtmutex_unlock(struct rtmutex *rtmutex)
prev_owner = rtmutex_unlock_fast(rtmutex);
- if (prev_owner & RTMUTEX_CONTENDED) {
- return;
+ if (unlikely(prev_owner & RTMUTEX_CONTENDED)) {
+ rtmutex_unlock_slow(rtmutex);
}
-
- rtmutex_unlock_slow(rtmutex);
}
#endif /* _KERN_RTMUTEX_H */