[CRIU] [PATCH 04/21] locks: add futex_wait_while_eq

Andrey Vagin avagin at openvz.org
Fri May 24 08:20:07 EDT 2013


 Wait while futex @f value is equal to @v

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/lock.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/lock.h b/include/lock.h
index fec5380..d736e90 100644
--- a/include/lock.h
+++ b/include/lock.h
@@ -95,6 +95,10 @@ static inline void futex_wait_while_gt(futex_t *f, u32 v)
 static inline void futex_wait_while_lt(futex_t *f, u32 v)
 { futex_wait_if_cond(f, v, >=); }
 
+/* Wait while futex @f value is equal to @v */
+static inline void futex_wait_while_eq(futex_t *f, u32 v)
+{ futex_wait_if_cond(f, v, !=); }
+
 /* Wait while futex @f value is @v */
 static inline void futex_wait_while(futex_t *f, u32 v)
 {
-- 
1.8.2



More information about the CRIU mailing list