Fix: handle sys_futex() FUTEX_WAIT interrupted by signal
[urcu.git] / urcu / futex.h
index 906d9b723ae88481fc7874e1409dc24dd80f35eb..2be3bb6c1dc96e5ee71d932f9a2ae7f5221d901b 100644 (file)
@@ -42,10 +42,13 @@ extern "C" {
  *
  * futex_async is signal-handler safe for the wakeup. It uses polling
  * on the wait-side in compatibility mode.
+ *
+ * BEWARE: sys_futex() FUTEX_WAIT may return early if interrupted
+ * (returns EINTR).
  */
 
 #ifdef CONFIG_RCU_HAVE_FUTEX
-#include <sys/syscall.h>
+#include <urcu/syscall-compat.h>
 #define futex(...)     syscall(__NR_futex, __VA_ARGS__)
 #define futex_noasync(uaddr, op, val, timeout, uaddr2, val3)   \
                futex(uaddr, op, val, timeout, uaddr2, val3)
This page took 0.022683 seconds and 4 git commands to generate.