projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support for sys_futex autodetection
[userspace-rcu.git]
/
urcu-defer.c
diff --git
a/urcu-defer.c
b/urcu-defer.c
index a38b5c0b9418af76287b3e552fd089f278cb5e55..ed627a356a0b58e938e89eaea83f7f58333aee52 100644
(file)
--- a/
urcu-defer.c
+++ b/
urcu-defer.c
@@
-32,14
+32,11
@@
#include <syscall.h>
#include <unistd.h>
#include <syscall.h>
#include <unistd.h>
+#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"
#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);
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);
{
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);
}
}
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)
} 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);
}
}
NULL, NULL, 0);
}
}
This page took
0.024452 seconds
and
4
git commands to generate.