summaryrefslogtreecommitdiff
path: root/kern/rtmutex.h
diff options
context:
space:
mode:
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 */