[CRIU] [PATCH 3/3] futex/lock: simplify a little futex_wait_if_cond()

Dmitry Safonov dsafonov at virtuozzo.com
Tue Aug 16 12:11:26 PDT 2016


Impact: cleanup, improve readability

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 criu/include/lock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/include/lock.h b/criu/include/lock.h
index 6aa7d55e6113..8a765338bd42 100644
--- a/criu/include/lock.h
+++ b/criu/include/lock.h
@@ -53,7 +53,7 @@ static inline void futex_set(futex_t *f, u32 v)
 								\
 		while (1) {					\
 			struct timespec to = {.tv_sec = 120};	\
-			tmp = (u32)atomic_read(&(__f)->raw);	\
+			tmp = futex_get(__f);			\
 			if ((tmp & FUTEX_ABORT_FLAG) ||		\
 			    (tmp __cond (__v)))			\
 				break;				\
-- 
2.9.0



More information about the CRIU mailing list