From: Michael Jeanson Date: Fri, 23 Nov 2018 20:27:04 +0000 (-0500) Subject: Fix: compat_futex_noasync on Cygwin X-Git-Tag: v0.9.6~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=44744c8fe51e3f1897c113f09ffdcbfedacb208e;p=urcu.git Fix: compat_futex_noasync on Cygwin The futex_noasync compat code uses a weak symbol to share state across different shared object which is not possible on Windows with the Portable Executable format. Use the async compat code for both cases. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/futex.h b/urcu/futex.h index 0486ff6..753df62 100644 --- a/urcu/futex.h +++ b/urcu/futex.h @@ -102,6 +102,25 @@ static inline int futex_async(int32_t *uaddr, int op, int32_t val, return ret; } +#elif defined(__CYGWIN__) + +/* + * The futex_noasync compat code uses a weak symbol to share state across + * different shared object which is not possible on Windows with the + * Portable Executable format. Use the async compat code for both cases. + */ +static inline int futex_noasync(int32_t *uaddr, int op, int32_t val, + const struct timespec *timeout, int32_t *uaddr2, int32_t val3) +{ + return compat_futex_async(uaddr, op, val, timeout, uaddr2, val3); +} + +static inline int futex_async(int32_t *uaddr, int op, int32_t val, + const struct timespec *timeout, int32_t *uaddr2, int32_t val3) +{ + return compat_futex_async(uaddr, op, val, timeout, uaddr2, val3); +} + #else static inline int futex_noasync(int32_t *uaddr, int op, int32_t val,