urcu-defer: remove dependency on linux/futex.h
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 23 Sep 2009 23:21:56 +0000 (19:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Wed, 23 Sep 2009 23:21:56 +0000 (19:21 -0400)
> cc -fPIC -Wall -I. -O2 -g -lpthread -c -o urcu-defer.o `echo urcu-defer.c urcu-defer.h | sed 's/[^ ]*\.h//g'`
> In file included from urcu-defer.c:31:
> /usr/include/linux/futex.h:96: error: expected ‘)’ before ‘*’ token
> /usr/include/linux/futex.h:100: error: expected ‘)’ before ‘*’ token

Seems broken on ppc. Just for two defines, it's not worth depending on it.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
urcu-defer.c

index 13f94fa0f05b05833152265da9147bdb456e88b6..f0dec91b6f5315d7430e749648fd6c315fa160c0 100644 (file)
@@ -28,7 +28,6 @@
 #include <string.h>
 #include <errno.h>
 #include <poll.h>
-#include <linux/futex.h>
 #include <sys/time.h>
 #include <syscall.h>
 #include <unistd.h>
@@ -38,6 +37,8 @@
 #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);
 
This page took 0.026412 seconds and 4 git commands to generate.