Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31406
b: refs/heads/master
c: 7f04ac0
h: refs/heads/master
v: v3
  • Loading branch information
Josh Triplett authored and Linus Torvalds committed Jun 30, 2006
1 parent a154771 commit 10788f6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 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: 7adc28ae75854d9d0940668404a14d1f006f80c0
refs/heads/master: 7f04ac062e92a37bb0fa3313405597244b4702c1
24 changes: 20 additions & 4 deletions trunk/include/linux/rcupdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,22 @@ extern int rcu_needs_cpu(int cpu);
*
* It is illegal to block while in an RCU read-side critical section.
*/
#define rcu_read_lock() preempt_disable()
#define rcu_read_lock() \
do { \
preempt_disable(); \
__acquire(RCU); \
} while(0)

/**
* rcu_read_unlock - marks the end of an RCU read-side critical section.
*
* See rcu_read_lock() for more information.
*/
#define rcu_read_unlock() preempt_enable()
#define rcu_read_unlock() \
do { \
__release(RCU); \
preempt_enable(); \
} while(0)

/*
* So where is rcu_write_lock()? It does not exist, as there is no
Expand All @@ -193,14 +201,22 @@ extern int rcu_needs_cpu(int cpu);
* can use just rcu_read_lock().
*
*/
#define rcu_read_lock_bh() local_bh_disable()
#define rcu_read_lock_bh() \
do { \
local_bh_disable(); \
__acquire(RCU_BH); \
} while(0)

/*
* rcu_read_unlock_bh - marks the end of a softirq-only RCU critical section
*
* See rcu_read_lock_bh() for more information.
*/
#define rcu_read_unlock_bh() local_bh_enable()
#define rcu_read_unlock_bh() \
do { \
__release(RCU_BH); \
local_bh_enable(); \
} while(0)

/**
* rcu_dereference - fetch an RCU-protected pointer in an
Expand Down

0 comments on commit 10788f6

Please sign in to comment.