Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277204
b: refs/heads/master
c: 00f49e5
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Paul E. McKenney committed Dec 11, 2011
1 parent f13d1ce commit 1856472
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0464e937485f15d2add78e3b0f498469f4e6600d
refs/heads/master: 00f49e5729af602deb559b0cf293a00b625e8636
52 changes: 42 additions & 10 deletions trunk/include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,53 @@ static inline int rcu_is_cpu_idle(void)
}
#endif /* else !CONFIG_PROVE_RCU */

static inline void rcu_lock_acquire(struct lockdep_map *map)
{
WARN_ON_ONCE(rcu_is_cpu_idle());
lock_acquire(map, 0, 0, 2, 1, NULL, _THIS_IP_);
}

static inline void rcu_lock_release(struct lockdep_map *map)
{
WARN_ON_ONCE(rcu_is_cpu_idle());
lock_release(map, 1, _THIS_IP_);
}

extern struct lockdep_map rcu_lock_map;
# define rcu_read_acquire() \
lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_)
# define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_)

static inline void rcu_read_acquire(void)
{
rcu_lock_acquire(&rcu_lock_map);
}

static inline void rcu_read_release(void)
{
rcu_lock_release(&rcu_lock_map);
}

extern struct lockdep_map rcu_bh_lock_map;
# define rcu_read_acquire_bh() \
lock_acquire(&rcu_bh_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_)
# define rcu_read_release_bh() lock_release(&rcu_bh_lock_map, 1, _THIS_IP_)

static inline void rcu_read_acquire_bh(void)
{
rcu_lock_acquire(&rcu_bh_lock_map);
}

static inline void rcu_read_release_bh(void)
{
rcu_lock_release(&rcu_bh_lock_map);
}

extern struct lockdep_map rcu_sched_lock_map;
# define rcu_read_acquire_sched() \
lock_acquire(&rcu_sched_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_)
# define rcu_read_release_sched() \
lock_release(&rcu_sched_lock_map, 1, _THIS_IP_)

static inline void rcu_read_acquire_sched(void)
{
rcu_lock_acquire(&rcu_sched_lock_map);
}

static inline void rcu_read_release_sched(void)
{
rcu_lock_release(&rcu_sched_lock_map);
}

extern int debug_lockdep_rcu_enabled(void);

Expand Down

0 comments on commit 1856472

Please sign in to comment.