Commit 06552fa3 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

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: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent d7f3be8a
......@@ -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)
......
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