diff options
Diffstat (limited to 'include/linux/rcupdate.h')
| -rw-r--r-- | include/linux/rcupdate.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 65163aa0bb04..75e5b393cf44 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
| @@ -64,7 +64,6 @@ void rcu_barrier_tasks(void); | |||
| 64 | 64 | ||
| 65 | void __rcu_read_lock(void); | 65 | void __rcu_read_lock(void); |
| 66 | void __rcu_read_unlock(void); | 66 | void __rcu_read_unlock(void); |
| 67 | void rcu_read_unlock_special(struct task_struct *t); | ||
| 68 | void synchronize_rcu(void); | 67 | void synchronize_rcu(void); |
| 69 | 68 | ||
| 70 | /* | 69 | /* |
| @@ -159,11 +158,11 @@ static inline void rcu_init_nohz(void) { } | |||
| 159 | } while (0) | 158 | } while (0) |
| 160 | 159 | ||
| 161 | /* | 160 | /* |
| 162 | * Note a voluntary context switch for RCU-tasks benefit. This is a | 161 | * Note a quasi-voluntary context switch for RCU-tasks's benefit. |
| 163 | * macro rather than an inline function to avoid #include hell. | 162 | * This is a macro rather than an inline function to avoid #include hell. |
| 164 | */ | 163 | */ |
| 165 | #ifdef CONFIG_TASKS_RCU | 164 | #ifdef CONFIG_TASKS_RCU |
| 166 | #define rcu_note_voluntary_context_switch_lite(t) \ | 165 | #define rcu_tasks_qs(t) \ |
| 167 | do { \ | 166 | do { \ |
| 168 | if (READ_ONCE((t)->rcu_tasks_holdout)) \ | 167 | if (READ_ONCE((t)->rcu_tasks_holdout)) \ |
| 169 | WRITE_ONCE((t)->rcu_tasks_holdout, false); \ | 168 | WRITE_ONCE((t)->rcu_tasks_holdout, false); \ |
| @@ -171,14 +170,14 @@ static inline void rcu_init_nohz(void) { } | |||
| 171 | #define rcu_note_voluntary_context_switch(t) \ | 170 | #define rcu_note_voluntary_context_switch(t) \ |
| 172 | do { \ | 171 | do { \ |
| 173 | rcu_all_qs(); \ | 172 | rcu_all_qs(); \ |
| 174 | rcu_note_voluntary_context_switch_lite(t); \ | 173 | rcu_tasks_qs(t); \ |
| 175 | } while (0) | 174 | } while (0) |
| 176 | void call_rcu_tasks(struct rcu_head *head, rcu_callback_t func); | 175 | void call_rcu_tasks(struct rcu_head *head, rcu_callback_t func); |
| 177 | void synchronize_rcu_tasks(void); | 176 | void synchronize_rcu_tasks(void); |
| 178 | void exit_tasks_rcu_start(void); | 177 | void exit_tasks_rcu_start(void); |
| 179 | void exit_tasks_rcu_finish(void); | 178 | void exit_tasks_rcu_finish(void); |
| 180 | #else /* #ifdef CONFIG_TASKS_RCU */ | 179 | #else /* #ifdef CONFIG_TASKS_RCU */ |
| 181 | #define rcu_note_voluntary_context_switch_lite(t) do { } while (0) | 180 | #define rcu_tasks_qs(t) do { } while (0) |
| 182 | #define rcu_note_voluntary_context_switch(t) rcu_all_qs() | 181 | #define rcu_note_voluntary_context_switch(t) rcu_all_qs() |
| 183 | #define call_rcu_tasks call_rcu_sched | 182 | #define call_rcu_tasks call_rcu_sched |
| 184 | #define synchronize_rcu_tasks synchronize_sched | 183 | #define synchronize_rcu_tasks synchronize_sched |
| @@ -195,8 +194,8 @@ static inline void exit_tasks_rcu_finish(void) { } | |||
| 195 | */ | 194 | */ |
| 196 | #define cond_resched_tasks_rcu_qs() \ | 195 | #define cond_resched_tasks_rcu_qs() \ |
| 197 | do { \ | 196 | do { \ |
| 198 | if (!cond_resched()) \ | 197 | rcu_tasks_qs(current); \ |
| 199 | rcu_note_voluntary_context_switch_lite(current); \ | 198 | cond_resched(); \ |
| 200 | } while (0) | 199 | } while (0) |
| 201 | 200 | ||
| 202 | /* | 201 | /* |
| @@ -567,8 +566,8 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
| 567 | * This is simply an identity function, but it documents where a pointer | 566 | * This is simply an identity function, but it documents where a pointer |
| 568 | * is handed off from RCU to some other synchronization mechanism, for | 567 | * is handed off from RCU to some other synchronization mechanism, for |
| 569 | * example, reference counting or locking. In C11, it would map to | 568 | * example, reference counting or locking. In C11, it would map to |
| 570 | * kill_dependency(). It could be used as follows: | 569 | * kill_dependency(). It could be used as follows:: |
| 571 | * `` | 570 | * |
| 572 | * rcu_read_lock(); | 571 | * rcu_read_lock(); |
| 573 | * p = rcu_dereference(gp); | 572 | * p = rcu_dereference(gp); |
| 574 | * long_lived = is_long_lived(p); | 573 | * long_lived = is_long_lived(p); |
| @@ -579,7 +578,6 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
| 579 | * p = rcu_pointer_handoff(p); | 578 | * p = rcu_pointer_handoff(p); |
| 580 | * } | 579 | * } |
| 581 | * rcu_read_unlock(); | 580 | * rcu_read_unlock(); |
| 582 | *`` | ||
| 583 | */ | 581 | */ |
| 584 | #define rcu_pointer_handoff(p) (p) | 582 | #define rcu_pointer_handoff(p) (p) |
| 585 | 583 | ||
