X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu-static.h;h=dec8a204166d2f2c9848227a7629c53057164958;hp=30bd7fddbea5372c08aff936751e79225893a314;hb=36bc70a84250927ba68d5096a0a9740aec157f9b;hpb=7e30abe3df0e83eeb741bfc18d07cb016af804a1 diff --git a/urcu-static.h b/urcu-static.h index 30bd7fd..dec8a20 100644 --- a/urcu-static.h +++ b/urcu-static.h @@ -37,12 +37,13 @@ #include #include #include -#include +#include #include +#include -#define futex(...) syscall(__NR_futex, __VA_ARGS__) -#define FUTEX_WAIT 0 -#define FUTEX_WAKE 1 +#ifdef __cplusplus +extern "C" { +#endif /* * This code section can only be included in LGPL 2.1 compatible source code. @@ -182,7 +183,7 @@ static inline void wake_up_gp(void) { if (unlikely(uatomic_read(&gp_futex) == -1)) { uatomic_set(&gp_futex, 0); - futex(&gp_futex, FUTEX_WAKE, 1, + futex_async(&gp_futex, FUTEX_WAKE, 1, NULL, NULL, 0); } } @@ -240,4 +241,8 @@ static inline void _rcu_read_unlock(void) } } +#ifdef __cplusplus +} +#endif + #endif /* _URCU_STATIC_H */