projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wfstack: header implementation should be defined as static inline
[urcu.git]
/
urcu
/
static
/
urcu.h
diff --git
a/urcu/static/urcu.h
b/urcu/static/urcu.h
index 5ba3004ddb17ccef50f69be9925ed8181923d65b..0295a3e5183cc57315e8488a03a70d0023286d51 100644
(file)
--- a/
urcu/static/urcu.h
+++ b/
urcu/static/urcu.h
@@
-45,13
+45,18
@@
extern "C" {
#endif
extern "C" {
#endif
-/* Default is RCU_MEMBARRIER
on linux
*/
+/* Default is RCU_MEMBARRIER */
#if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL)
#if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL)
-# ifdef __linux__
-# define RCU_MEMBARRIER
-# else
-# define RCU_MB
-# endif
+#define RCU_MEMBARRIER
+#endif
+
+/*
+ * RCU_MEMBARRIER is only possibly available on Linux. Fallback to RCU_MB
+ * otherwise.
+ */
+#if !defined(__linux__) && defined(RCU_MEMBARRIER)
+#undef RCU_MEMBARRIER
+#define RCU_MB
#endif
#ifdef RCU_MEMBARRIER
#endif
#ifdef RCU_MEMBARRIER
@@
-146,7
+151,7
@@
static inline void debug_yield_write(void)
static inline void debug_yield_init(void)
{
static inline void debug_yield_init(void)
{
- rand_yield = time(NULL) ^ pthread_self();
+ rand_yield = time(NULL) ^
(unsigned long)
pthread_self();
}
#else
static inline void debug_yield_read(void)
}
#else
static inline void debug_yield_read(void)
This page took
0.02618 seconds
and
4
git commands to generate.