mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-24 10:38:06 +00:00
zdtm/lock: make futex_inc and futex_dec atomical
Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
204599aa65
commit
1a89dbb5da
1 changed files with 2 additions and 2 deletions
|
|
@ -83,10 +83,10 @@ static inline void futex_dec_and_wake(futex_t *f)
|
|||
}
|
||||
|
||||
/* Plain increment futex @f value */
|
||||
static inline void futex_inc(futex_t *f) { f->raw++; }
|
||||
static inline void futex_inc(futex_t *f) { atomic_inc(&f->raw); }
|
||||
|
||||
/* Plain decrement futex @f value */
|
||||
static inline void futex_dec(futex_t *f) { f->raw--; }
|
||||
static inline void futex_dec(futex_t *f) { atomic_dec(&f->raw); }
|
||||
|
||||
/* Wait until futex @f value become @v */
|
||||
static inline void futex_wait_until(futex_t *f, uint32_t v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue