Commit 42212bf8 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

futex/lock: simplify a little futex_wait_if_cond()

Impact: cleanup, improve readability
Signed-off-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent f1d7964e
...@@ -53,7 +53,7 @@ static inline void futex_set(futex_t *f, u32 v) ...@@ -53,7 +53,7 @@ static inline void futex_set(futex_t *f, u32 v)
\ \
while (1) { \ while (1) { \
struct timespec to = {.tv_sec = 120}; \ struct timespec to = {.tv_sec = 120}; \
tmp = (u32)atomic_read(&(__f)->raw); \ tmp = futex_get(__f); \
if ((tmp & FUTEX_ABORT_FLAG) || \ if ((tmp & FUTEX_ABORT_FLAG) || \
(tmp __cond (__v))) \ (tmp __cond (__v))) \
break; \ break; \
......
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