X-Git-Url: https://git.lttng.org/?p=urcu.git;a=blobdiff_plain;f=urcu-defer.c;h=ed627a356a0b58e938e89eaea83f7f58333aee52;hp=a38b5c0b9418af76287b3e552fd089f278cb5e55;hb=0854ccff976f2893a7f04aaa4b48090f423802a5;hpb=d45599f4bfd3283dbab0f023d051b9b9b0639c0d diff --git a/urcu-defer.c b/urcu-defer.c index a38b5c0..ed627a3 100644 --- a/urcu-defer.c +++ b/urcu-defer.c @@ -32,14 +32,11 @@ #include #include +#include "urcu/urcu-futex.h" #include "urcu-defer-static.h" /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */ #include "urcu-defer.h" -#define futex(...) syscall(__NR_futex, __VA_ARGS__) -#define FUTEX_WAIT 0 -#define FUTEX_WAKE 1 - void __attribute__((destructor)) urcu_defer_exit(void); extern void synchronize_rcu(void); @@ -101,7 +98,7 @@ static void wake_up_defer(void) { if (unlikely(uatomic_read(&defer_thread_futex) == -1)) { uatomic_set(&defer_thread_futex, 0); - futex(&defer_thread_futex, FUTEX_WAKE, 1, + futex_noasync(&defer_thread_futex, FUTEX_WAKE, 1, NULL, NULL, 0); } } @@ -134,7 +131,7 @@ static void wait_defer(void) } else { smp_rmb(); /* Read queue before read futex */ if (uatomic_read(&defer_thread_futex) == -1) - futex(&defer_thread_futex, FUTEX_WAIT, -1, + futex_noasync(&defer_thread_futex, FUTEX_WAIT, -1, NULL, NULL, 0); } }