projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tls-compat.h: document sigaltstack(2) limitation
[userspace-rcu.git]
/
urcu
/
static
/
urcu-pointer.h
diff --git
a/urcu/static/urcu-pointer.h
b/urcu/static/urcu-pointer.h
index acd7cee1f0677554794f238e945715e1e4bd3b10..48dc5bf506d86b06ddb1b5b4cf72066508634493 100644
(file)
--- a/
urcu/static/urcu-pointer.h
+++ b/
urcu/static/urcu-pointer.h
@@
-62,7
+62,7
@@
extern "C" {
*/
#define _rcu_dereference(p) ({ \
*/
#define _rcu_dereference(p) ({ \
-
typeof
(p) _________p1 = CMM_LOAD_SHARED(p); \
+
__typeof__
(p) _________p1 = CMM_LOAD_SHARED(p); \
cmm_smp_read_barrier_depends(); \
(_________p1); \
})
cmm_smp_read_barrier_depends(); \
(_________p1); \
})
@@
-77,8
+77,8
@@
extern "C" {
#define _rcu_cmpxchg_pointer(p, old, _new) \
({ \
#define _rcu_cmpxchg_pointer(p, old, _new) \
({ \
-
typeof(*p) _________pold = (old);
\
-
typeof(*p) _________pnew = (_new);
\
+
__typeof__(*p) _________pold = (old);
\
+
__typeof__(*p) _________pnew = (_new);
\
if (!__builtin_constant_p(_new) || \
((_new) != NULL)) \
cmm_wmb(); \
if (!__builtin_constant_p(_new) || \
((_new) != NULL)) \
cmm_wmb(); \
@@
-93,7
+93,7
@@
extern "C" {
#define _rcu_xchg_pointer(p, v) \
({ \
#define _rcu_xchg_pointer(p, v) \
({ \
-
typeof(*p) _________pv = (v);
\
+
__typeof__(*p) _________pv = (v);
\
if (!__builtin_constant_p(v) || \
((v) != NULL)) \
cmm_wmb(); \
if (!__builtin_constant_p(v) || \
((v) != NULL)) \
cmm_wmb(); \
@@
-102,13
+102,13
@@
extern "C" {
#define _rcu_set_pointer(p, v) \
#define _rcu_set_pointer(p, v) \
-
({
\
-
typeof(*p) _________pv = (v);
\
+
do {
\
+
__typeof__(*p) _________pv = (v);
\
if (!__builtin_constant_p(v) || \
((v) != NULL)) \
cmm_wmb(); \
uatomic_set(p, _________pv); \
if (!__builtin_constant_p(v) || \
((v) != NULL)) \
cmm_wmb(); \
uatomic_set(p, _________pv); \
- })
+ }
while (0
)
/**
* _rcu_assign_pointer - assign (publicize) a pointer to a new data structure
/**
* _rcu_assign_pointer - assign (publicize) a pointer to a new data structure
This page took
0.025363 seconds
and
4
git commands to generate.