Commit 4b5f7849 authored by Charlie Jacobsen's avatar Charlie Jacobsen

Bug in kernel platform trylock definition.

Unlike other kernel functions, mutex_trylock returns 1 on sucess
and 0 on error. The double negations were inverting the interpretation
of the result. (It still worked because on the first attempt, we
interpreted as a failure and tried again; on the second attempt, it
was really a failure to take the lock but we interpreted as a
success.)
parent 1290d48e
Pipeline #512 passed with stage
......@@ -39,7 +39,7 @@ static inline int __cap_mutex_lock(cap_mutex_t *mutex)
static inline int __cap_mutex_trylock(cap_mutex_t *mutex)
{
return !mutex_trylock(mutex);
return mutex_trylock(mutex);
}
static inline int __cap_mutex_lock_interruptible(cap_mutex_t *mutex)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment