projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add CodingStyle to tarball
[urcu.git]
/
urcu-pointer.h
diff --git
a/urcu-pointer.h
b/urcu-pointer.h
index dd64ec4128fadb2f7b39971a0d975c891c0a6013..1e1e6bf8a157dff00edcfda519a773b1e0a4a32d 100644
(file)
--- a/
urcu-pointer.h
+++ b/
urcu-pointer.h
@@
-47,9
+47,9
@@
extern "C" {
#define rcu_dereference _rcu_dereference
/*
#define rcu_dereference _rcu_dereference
/*
- * rcu_cmpxchg_pointer(type **ptr, type *new, type *old)
+ *
type *
rcu_cmpxchg_pointer(type **ptr, type *new, type *old)
* type *rcu_xchg_pointer(type **ptr, type *new)
* type *rcu_xchg_pointer(type **ptr, type *new)
- *
type *
rcu_set_pointer(type **ptr, type *new)
+ *
void
rcu_set_pointer(type **ptr, type *new)
*
* RCU pointer updates.
* @ptr: address of the pointer to modify
*
* RCU pointer updates.
* @ptr: address of the pointer to modify
@@
-94,20
+94,24
@@
extern void *rcu_xchg_pointer_sym(void **p, void *v);
(_________p1); \
})
(_________p1); \
})
+/*
+ * Note: rcu_set_pointer_sym returns @v because we don't want to break
+ * the ABI. At the API level, rcu_set_pointer() now returns void. Use of
+ * the return value is therefore deprecated, and will cause a build
+ * error.
+ */
extern void *rcu_set_pointer_sym(void **p, void *v);
#define rcu_set_pointer(p, v) \
extern void *rcu_set_pointer_sym(void **p, void *v);
#define rcu_set_pointer(p, v) \
-
({
\
+
do {
\
typeof(*(p)) _________pv = (v); \
typeof(*(p)) _________pv = (v); \
- typeof(*(p)) _________p1 = URCU_FORCE_CAST(typeof(*(p)), \
- rcu_set_pointer_sym(URCU_FORCE_CAST(void **, p), \
- _________pv)); \
- (_________p1); \
- })
+ (void) rcu_set_pointer_sym(URCU_FORCE_CAST(void **, p), \
+ _________pv); \
+ } while (0)
#endif /* !_LGPL_SOURCE */
/*
#endif /* !_LGPL_SOURCE */
/*
- * rcu_assign_pointer(type *ptr, type *new)
+ *
void
rcu_assign_pointer(type *ptr, type *new)
*
* Same as rcu_set_pointer, but takes the pointer to assign to rather than its
* address as first parameter. Provided for compatibility with the Linux kernel
*
* Same as rcu_set_pointer, but takes the pointer to assign to rather than its
* address as first parameter. Provided for compatibility with the Linux kernel
This page took
0.024523 seconds
and
4
git commands to generate.