X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=include%2Furcu%2Ffutex.h;h=c206c6fce0d373c4a6dcffbdb7df4e5b37144194;hp=0486ff6a1830f174d7471164a282507a6d1f756c;hb=6a29bfc1b6d5d57c4dbd8811a5229cf993e5fa65;hpb=6893800a4d1cc14dff0395ddcd660a5138db183d diff --git a/include/urcu/futex.h b/include/urcu/futex.h index 0486ff6..c206c6f 100644 --- a/include/urcu/futex.h +++ b/include/urcu/futex.h @@ -25,6 +25,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -102,6 +103,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,