projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pthread_self should be cast to unsigned long
[urcu.git]
/
urcu
/
static
/
urcu.h
diff --git
a/urcu/static/urcu.h
b/urcu/static/urcu.h
index 18e4826a5a31789c7cb408832421cbddb7d83c22..f2293bca5054db275cd52e413a2e954ecd60af86 100644
(file)
--- a/
urcu/static/urcu.h
+++ b/
urcu/static/urcu.h
@@
-31,28
+31,31
@@
#include <stdlib.h>
#include <pthread.h>
#include <stdlib.h>
#include <pthread.h>
-#include <syscall.h>
#include <unistd.h>
#include <unistd.h>
+#include <stdint.h>
#include <urcu/compiler.h>
#include <urcu/arch.h>
#include <urcu/system.h>
#include <urcu/compiler.h>
#include <urcu/arch.h>
#include <urcu/system.h>
-#include <urcu/uatomic
_arch
.h>
+#include <urcu/uatomic.h>
#include <urcu/list.h>
#include <urcu/list.h>
-#include <urcu/
urcu-
futex.h>
+#include <urcu/futex.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
extern "C" {
#endif
-/* Default is RCU_MEMBARRIER */
+/* Default is RCU_MEMBARRIER
on linux
*/
#if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL)
#if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL)
-#define RCU_MEMBARRIER
+# ifdef __linux__
+# define RCU_MEMBARRIER
+# else
+# define RCU_MB
+# endif
#endif
#ifdef RCU_MEMBARRIER
#endif
#ifdef RCU_MEMBARRIER
-#include <unistd.h>
-#include <sys/syscall.h>
+#include <syscall.h>
/* If the headers do not support SYS_membarrier, statically use RCU_MB */
#ifdef SYS_membarrier
/* If the headers do not support SYS_membarrier, statically use RCU_MB */
#ifdef SYS_membarrier
@@
-143,7
+146,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)
@@
-228,7
+231,7
@@
struct rcu_reader {
extern struct rcu_reader __thread rcu_reader;
extern struct rcu_reader __thread rcu_reader;
-extern int gp_futex;
+extern int
32_t
gp_futex;
/*
* Wake-up waiting synchronize_rcu(). Called from many concurrent threads.
/*
* Wake-up waiting synchronize_rcu(). Called from many concurrent threads.
This page took
0.02432 seconds
and
4
git commands to generate.