Commit | Line | Data |
---|---|---|
c97ae6eb PMF |
1 | Userspace RCU Implementatation |
2 | by Mathieu Desnoyers and Paul E. McKenney | |
6991f61a | 3 | |
c97ae6eb PMF |
4 | BUILDING |
5 | -------- | |
6991f61a | 6 | |
c97ae6eb PMF |
7 | make |
8 | make install | |
9 | ||
aa8c36e0 | 10 | |
c97ae6eb PMF |
11 | QUICK START GUIDE |
12 | ----------------- | |
aa8c36e0 | 13 | |
c97ae6eb PMF |
14 | Initialization |
15 | ||
16 | Each thread that has reader critical sections (that uses | |
17 | rcu_read_lock()/rcu_read_unlock() must first register to the URCU | |
18 | library. This is done by calling rcu_register_thread(). | |
19 | ||
20 | Reading | |
21 | ||
22 | Reader critical sections must be protected by locating them between | |
23 | calls to rcu_read_lock() and rcu_read_unlock(). Inside that lock, | |
24 | rcu_dereference() may be called to read an RCU protected pointer. | |
25 | ||
26 | Writing | |
27 | ||
28 | rcu_assign_pointer() and rcu_xchg_pointer() may be called anywhere. | |
29 | After, synchronize_rcu() must be called. When it returns, the old values | |
30 | are not in usage anymore. | |
31 | ||
32 | ||
33 | Usage of DEBUG_FULL_MB | |
34 | ||
35 | DEBUG_FULL_MB uses full SMP barriers for readers. This eliminates the | |
36 | need for signals but results in slower reads. | |
37 | ||
38 | ||
39 | Usage of DEBUG_YIELD | |
40 | ||
41 | DEBUG_YIELD is used to add random delays in the code for testing | |
42 | purposes. | |
6991f61a | 43 |