projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: urcu-bp: re-initialize list head on library exit
[userspace-rcu.git]
/
urcu
/
arch
/
x86.h
diff --git
a/urcu/arch/x86.h
b/urcu/arch/x86.h
index ecc4b2d39b4133cb026fbe98be6cace2c5c3e223..aac8ca1384b63f4ce321680cffbcaca661a0f16c 100644
(file)
--- a/
urcu/arch/x86.h
+++ b/
urcu/arch/x86.h
@@
-25,10
+25,11
@@
#include <urcu/compiler.h>
#include <urcu/config.h>
#include <urcu/syscall-compat.h>
#include <urcu/compiler.h>
#include <urcu/config.h>
#include <urcu/syscall-compat.h>
+#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#ifdef __cplusplus
extern "C" {
-#endif
+#endif
#define CAA_CACHE_LINE_SIZE 128
#define CAA_CACHE_LINE_SIZE 128
@@
-69,6
+70,8
@@
extern "C" {
#define caa_cpu_relax() __asm__ __volatile__ ("rep; nop" : : : "memory")
#define caa_cpu_relax() __asm__ __volatile__ ("rep; nop" : : : "memory")
+#define HAS_CAA_GET_CYCLES
+
#define rdtscll(val) \
do { \
unsigned int __a, __d; \
#define rdtscll(val) \
do { \
unsigned int __a, __d; \
@@
-77,31
+80,29
@@
extern "C" {
| (((unsigned long long)__d) << 32); \
} while(0)
| (((unsigned long long)__d) << 32); \
} while(0)
-typedef u
nsigned long long
cycles_t;
+typedef u
int64_t caa_
cycles_t;
-static inline cycles_t caa_get_cycles(void)
+static inline c
aa_c
ycles_t caa_get_cycles(void)
{
{
- cycles_t ret = 0;
+ c
aa_c
ycles_t ret = 0;
rdtscll(ret);
return ret;
}
/*
rdtscll(ret);
return ret;
}
/*
- *
Define the membarrier system call number if not yet available in the
- * system headers.
+ *
On Linux, define the membarrier system call number if not yet available in
+ *
the
system headers.
*/
*/
+#if (defined(__linux__) && !defined(__NR_membarrier))
#if (CAA_BITS_PER_LONG == 32)
#if (CAA_BITS_PER_LONG == 32)
-#ifndef __NR_membarrier
#define __NR_membarrier 375
#define __NR_membarrier 375
-#endif
#else
#else
-#ifndef __NR_membarrier
#define __NR_membarrier 324
#endif
#endif
#define __NR_membarrier 324
#endif
#endif
-#ifdef __cplusplus
+#ifdef __cplusplus
}
#endif
}
#endif
This page took
0.027811 seconds
and
4
git commands to generate.