projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing urcu-defer.{so,h} and urcu-defer-static.h
[urcu.git]
/
arch_x86.h
diff --git
a/arch_x86.h
b/arch_x86.h
index e7d945e3859393edece5eb4b2aee4c99538083e2..8a5732536c9d3106af919b5467dab1f58c5f9313 100644
(file)
--- a/
arch_x86.h
+++ b/
arch_x86.h
@@
-97,10
+97,22
@@
static inline void cpu_relax(void)
/*
* Serialize core instruction execution. Also acts as a compiler barrier.
*/
/*
* Serialize core instruction execution. Also acts as a compiler barrier.
*/
+#ifdef __PIC__
+/*
+ * Cannot use cpuid because it clobbers the ebx register and clashes
+ * with -fPIC :
+ * error: PIC register 'ebx' clobbered in 'asm'
+ */
+static inline void sync_core(void)
+{
+ mb();
+}
+#else
static inline void sync_core(void)
{
asm volatile("cpuid" : : : "memory", "eax", "ebx", "ecx", "edx");
}
static inline void sync_core(void)
{
asm volatile("cpuid" : : : "memory", "eax", "ebx", "ecx", "edx");
}
+#endif
#define rdtscll(val) \
do { \
#define rdtscll(val) \
do { \
This page took
0.023735 seconds
and
4
git commands to generate.