Skip to content

Commit

Permalink
include/linux:: rcupdate: add nonull pointer
Browse files Browse the repository at this point in the history
Signed-off-by: garwedgess <garethwilliams21@gmail.com>
  • Loading branch information
garwedgess committed Jun 11, 2013
1 parent e3c2d79 commit da862b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern int rcu_scheduler_active;

#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU)
#include <linux/rcutree.h>
#elif defined(CONFIG_TINY_RCU)
#elif CONFIG_TINY_RCU
#include <linux/rcutiny.h>
#else
#error "Unknown RCU implementation specified to kernel configuration"
Expand Down Expand Up @@ -366,6 +366,14 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
(p) = (v); \
})

#define rcu_assign_pointer_nonull(p, v) \
({ \
if (!__builtin_constant_p(v)) \
smp_wmb(); \
(p) = (v); \
})


/* Infrastructure to implement the synchronize_() primitives. */

struct rcu_synchronize {
Expand Down

0 comments on commit da862b1

Please sign in to comment.