Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277205
b: refs/heads/master
c: d8ab29f
h: refs/heads/master
i:
  277203: f13d1ce
v: v3
  • Loading branch information
Paul E. McKenney authored and Paul E. McKenney committed Dec 11, 2011
1 parent 1856472 commit 1f34b5b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 46 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: 00f49e5729af602deb559b0cf293a00b625e8636
refs/heads/master: d8ab29f8be918b34a1ccd174569a53f0eb04b0a5
53 changes: 8 additions & 45 deletions trunk/include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,41 +250,8 @@ static inline void rcu_lock_release(struct lockdep_map *map)
}

extern struct lockdep_map rcu_lock_map;

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;

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;

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 Expand Up @@ -364,12 +331,8 @@ static inline int rcu_read_lock_sched_held(void)

#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */

# define rcu_read_acquire() do { } while (0)
# define rcu_read_release() do { } while (0)
# define rcu_read_acquire_bh() do { } while (0)
# define rcu_read_release_bh() do { } while (0)
# define rcu_read_acquire_sched() do { } while (0)
# define rcu_read_release_sched() do { } while (0)
# define rcu_lock_acquire(a) do { } while (0)
# define rcu_lock_release(a) do { } while (0)

static inline int rcu_read_lock_held(void)
{
Expand Down Expand Up @@ -690,7 +653,7 @@ static inline void rcu_read_lock(void)
{
__rcu_read_lock();
__acquire(RCU);
rcu_read_acquire();
rcu_lock_acquire(&rcu_lock_map);
}

/*
Expand All @@ -710,7 +673,7 @@ static inline void rcu_read_lock(void)
*/
static inline void rcu_read_unlock(void)
{
rcu_read_release();
rcu_lock_release(&rcu_lock_map);
__release(RCU);
__rcu_read_unlock();
}
Expand All @@ -731,7 +694,7 @@ static inline void rcu_read_lock_bh(void)
{
local_bh_disable();
__acquire(RCU_BH);
rcu_read_acquire_bh();
rcu_lock_acquire(&rcu_bh_lock_map);
}

/*
Expand All @@ -741,7 +704,7 @@ static inline void rcu_read_lock_bh(void)
*/
static inline void rcu_read_unlock_bh(void)
{
rcu_read_release_bh();
rcu_lock_release(&rcu_bh_lock_map);
__release(RCU_BH);
local_bh_enable();
}
Expand All @@ -758,7 +721,7 @@ static inline void rcu_read_lock_sched(void)
{
preempt_disable();
__acquire(RCU_SCHED);
rcu_read_acquire_sched();
rcu_lock_acquire(&rcu_sched_lock_map);
}

/* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */
Expand All @@ -775,7 +738,7 @@ static inline notrace void rcu_read_lock_sched_notrace(void)
*/
static inline void rcu_read_unlock_sched(void)
{
rcu_read_release_sched();
rcu_lock_release(&rcu_sched_lock_map);
__release(RCU_SCHED);
preempt_enable();
}
Expand Down

0 comments on commit 1f34b5b

Please sign in to comment.