diff options
Diffstat (limited to 'include/linux/rcutiny.h')
| -rw-r--r-- | include/linux/rcutiny.h | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 96cc307ed9f4..e2e893144a84 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h | |||
| @@ -29,6 +29,10 @@ | |||
| 29 | 29 | ||
| 30 | void rcu_sched_qs(int cpu); | 30 | void rcu_sched_qs(int cpu); |
| 31 | void rcu_bh_qs(int cpu); | 31 | void rcu_bh_qs(int cpu); |
| 32 | static inline void rcu_note_context_switch(int cpu) | ||
| 33 | { | ||
| 34 | rcu_sched_qs(cpu); | ||
| 35 | } | ||
| 32 | 36 | ||
| 33 | #define __rcu_read_lock() preempt_disable() | 37 | #define __rcu_read_lock() preempt_disable() |
| 34 | #define __rcu_read_unlock() preempt_enable() | 38 | #define __rcu_read_unlock() preempt_enable() |
| @@ -60,9 +64,29 @@ static inline long rcu_batches_completed_bh(void) | |||
| 60 | return 0; | 64 | return 0; |
| 61 | } | 65 | } |
| 62 | 66 | ||
| 63 | extern int rcu_expedited_torture_stats(char *page); | 67 | static inline void rcu_force_quiescent_state(void) |
| 68 | { | ||
| 69 | } | ||
| 70 | |||
| 71 | static inline void rcu_bh_force_quiescent_state(void) | ||
| 72 | { | ||
| 73 | } | ||
| 74 | |||
| 75 | static inline void rcu_sched_force_quiescent_state(void) | ||
| 76 | { | ||
| 77 | } | ||
| 78 | |||
| 79 | extern void synchronize_sched(void); | ||
| 80 | |||
| 81 | static inline void synchronize_rcu(void) | ||
| 82 | { | ||
| 83 | synchronize_sched(); | ||
| 84 | } | ||
| 64 | 85 | ||
| 65 | #define synchronize_rcu synchronize_sched | 86 | static inline void synchronize_rcu_bh(void) |
| 87 | { | ||
| 88 | synchronize_sched(); | ||
| 89 | } | ||
| 66 | 90 | ||
| 67 | static inline void synchronize_rcu_expedited(void) | 91 | static inline void synchronize_rcu_expedited(void) |
| 68 | { | 92 | { |
| @@ -93,10 +117,6 @@ static inline void rcu_exit_nohz(void) | |||
| 93 | 117 | ||
| 94 | #endif /* #else #ifdef CONFIG_NO_HZ */ | 118 | #endif /* #else #ifdef CONFIG_NO_HZ */ |
| 95 | 119 | ||
| 96 | static inline void rcu_scheduler_starting(void) | ||
| 97 | { | ||
| 98 | } | ||
| 99 | |||
| 100 | static inline void exit_rcu(void) | 120 | static inline void exit_rcu(void) |
| 101 | { | 121 | { |
| 102 | } | 122 | } |
| @@ -106,4 +126,17 @@ static inline int rcu_preempt_depth(void) | |||
| 106 | return 0; | 126 | return 0; |
| 107 | } | 127 | } |
| 108 | 128 | ||
| 129 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 130 | |||
| 131 | extern int rcu_scheduler_active __read_mostly; | ||
| 132 | extern void rcu_scheduler_starting(void); | ||
| 133 | |||
| 134 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
| 135 | |||
| 136 | static inline void rcu_scheduler_starting(void) | ||
| 137 | { | ||
| 138 | } | ||
| 139 | |||
| 140 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | ||
| 141 | |||
| 109 | #endif /* __LINUX_RCUTINY_H */ | 142 | #endif /* __LINUX_RCUTINY_H */ |
