diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-11-11 18:59:34 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-12-12 21:24:23 +0100 |
commit | 462225ae47d7175f886281d8a91708550cd5178c (patch) | |
tree | 46048d886502e6a177a485a965f5f3371f545d43 /Documentation/RCU | |
parent | rcu: Make rcu_assign_pointer's assignment volatile and type-safe (diff) | |
download | linux-462225ae47d7175f886281d8a91708550cd5178c.tar.xz linux-462225ae47d7175f886281d8a91708550cd5178c.zip |
rcu: Add an RCU_INITIALIZER for global RCU-protected pointers
There is currently no way to initialize a global RCU-protected pointer
without either putting up with sparse complaints or open-coding an
obscure cast. This commit therefore creates RCU_INITIALIZER(), which
is intended to be used as follows:
struct foo __rcu *p = RCU_INITIALIZER(&my_rcu_structure);
This commit also applies RCU_INITIALIZER() to eliminate repeated
open-coded obscure casts in __rcu_assign_pointer(), RCU_INIT_POINTER(),
and RCU_POINTER_INITIALIZER(). This commit also inlines
__rcu_assign_pointer() into its only caller, rcu_assign_pointer().
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'Documentation/RCU')
0 files changed, 0 insertions, 0 deletions