projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: properly detect 'cmpxchg' on x86-32
[urcu.git]
/
include
/
urcu
/
uatomic
/
x86.h
diff --git
a/include/urcu/uatomic/x86.h
b/include/urcu/uatomic/x86.h
index c02c96d88af8bcf4beaedb36475daacf6a741a46..d416963c31aeca0cdd5003b67858c1209779627c 100644
(file)
--- a/
include/urcu/uatomic/x86.h
+++ b/
include/urcu/uatomic/x86.h
@@
-41,10
+41,16
@@
extern "C" {
* containing an array of char of the specified size. This allows passing the
* @addr arguments of the following inline functions as "m" and "+m" operands
* to the assembly. The @size parameter should be a constant to support
* containing an array of char of the specified size. This allows passing the
* @addr arguments of the following inline functions as "m" and "+m" operands
* to the assembly. The @size parameter should be a constant to support
- * compilers such as clang which do not support VLA.
+ * compilers such as clang which do not support VLA. Create typedefs because
+ * C++ does not allow types be defined in casts.
*/
*/
-#define __hp(size, x) ((struct { char v[size]; } *)(x))
+typedef struct { char v[1]; } __hp_1;
+typedef struct { char v[2]; } __hp_2;
+typedef struct { char v[4]; } __hp_4;
+typedef struct { char v[8]; } __hp_8;
+
+#define __hp(size, x) ((__hp_##size *)(x))
#define _uatomic_set(addr, v) ((void) CMM_STORE_SHARED(*(addr), (v)))
#define _uatomic_set(addr, v) ((void) CMM_STORE_SHARED(*(addr), (v)))
@@
-523,7
+529,7
@@
void __uatomic_dec(void *addr, int len)
#define _uatomic_dec(addr) (__uatomic_dec((addr), sizeof(*(addr))))
#define _uatomic_dec(addr) (__uatomic_dec((addr), sizeof(*(addr))))
-#if
((CAA_BITS_PER_LONG != 64) && defined(URCU_ARCH_I386))
+#if
def URCU_ARCH_X86_NO_CAS
/* For backwards compat */
#define CONFIG_RCU_COMPAT_ARCH 1
/* For backwards compat */
#define CONFIG_RCU_COMPAT_ARCH 1
This page took
0.023628 seconds
and
4
git commands to generate.