mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
locks: Mask futexes aligned
System call sys_futex() requires that (from futex(2)):
"On all platforms, futexes are four-byte integers
that must be aligned on a four-byte boundary".
travis-ci: success for locks: Mask futexes aligned
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
d7f3be8a8e
commit
06552fa3a2
1 changed files with 2 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include "common/asm/atomic.h"
|
||||
#include "common/compiler.h"
|
||||
|
||||
#define LOCK_BUG_ON(condition) \
|
||||
if ((condition)) \
|
||||
|
|
@ -29,7 +30,7 @@ static inline long sys_futex (uint32_t *addr1, int op, uint32_t val1,
|
|||
|
||||
typedef struct {
|
||||
atomic_t raw;
|
||||
} futex_t;
|
||||
} __aligned(sizeof(int)) futex_t;
|
||||
|
||||
#define FUTEX_ABORT_FLAG (0x80000000)
|
||||
#define FUTEX_ABORT_RAW (-1U)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue