projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add extern "C" to support linking userspace RCU library with C++ applications
[userspace-rcu.git]
/
urcu-qsbr-static.h
diff --git
a/urcu-qsbr-static.h
b/urcu-qsbr-static.h
index 150bc09bbc8c1779598bf6fdf435284120225aed..72d35957e802c42733ed415d871a9c4aa54a74ac 100644
(file)
--- a/
urcu-qsbr-static.h
+++ b/
urcu-qsbr-static.h
@@
-41,10
+41,11
@@
#include <urcu/system.h>
#include <urcu/uatomic_arch.h>
#include <urcu/list.h>
#include <urcu/system.h>
#include <urcu/uatomic_arch.h>
#include <urcu/list.h>
+#include <urcu/urcu-futex.h>
-#
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.
/*
* This code section can only be included in LGPL 2.1 compatible source code.
@@
-154,7
+155,7
@@
static inline void wake_up_gp(void)
{
if (unlikely(uatomic_read(&gp_futex) == -1)) {
uatomic_set(&gp_futex, 0);
{
if (unlikely(uatomic_read(&gp_futex) == -1)) {
uatomic_set(&gp_futex, 0);
- futex(&gp_futex, FUTEX_WAKE, 1,
+ futex
_noasync
(&gp_futex, FUTEX_WAKE, 1,
NULL, NULL, 0);
}
}
NULL, NULL, 0);
}
}
@@
-213,4
+214,8
@@
static inline void _rcu_thread_online(void)
smp_mb();
}
smp_mb();
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _URCU_QSBR_STATIC_H */
#endif /* _URCU_QSBR_STATIC_H */
This page took
0.024265 seconds
and
4
git commands to generate.