diff options
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r-- | include/linux/rcupdate.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index a6ddc42f87a5..043d04784675 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -197,7 +197,7 @@ static inline void exit_tasks_rcu_finish(void) { } | |||
197 | #define cond_resched_rcu_qs() \ | 197 | #define cond_resched_rcu_qs() \ |
198 | do { \ | 198 | do { \ |
199 | if (!cond_resched()) \ | 199 | if (!cond_resched()) \ |
200 | rcu_note_voluntary_context_switch(current); \ | 200 | rcu_note_voluntary_context_switch_lite(current); \ |
201 | } while (0) | 201 | } while (0) |
202 | 202 | ||
203 | /* | 203 | /* |
@@ -433,12 +433,12 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
433 | * @p: The pointer to read | 433 | * @p: The pointer to read |
434 | * | 434 | * |
435 | * Return the value of the specified RCU-protected pointer, but omit the | 435 | * Return the value of the specified RCU-protected pointer, but omit the |
436 | * smp_read_barrier_depends() and keep the READ_ONCE(). This is useful | 436 | * lockdep checks for being in an RCU read-side critical section. This is |
437 | * when the value of this pointer is accessed, but the pointer is not | 437 | * useful when the value of this pointer is accessed, but the pointer is |
438 | * dereferenced, for example, when testing an RCU-protected pointer against | 438 | * not dereferenced, for example, when testing an RCU-protected pointer |
439 | * NULL. Although rcu_access_pointer() may also be used in cases where | 439 | * against NULL. Although rcu_access_pointer() may also be used in cases |
440 | * update-side locks prevent the value of the pointer from changing, you | 440 | * where update-side locks prevent the value of the pointer from changing, |
441 | * should instead use rcu_dereference_protected() for this use case. | 441 | * you should instead use rcu_dereference_protected() for this use case. |
442 | * | 442 | * |
443 | * It is also permissible to use rcu_access_pointer() when read-side | 443 | * It is also permissible to use rcu_access_pointer() when read-side |
444 | * access to the pointer was removed at least one grace period ago, as | 444 | * access to the pointer was removed at least one grace period ago, as |
@@ -521,12 +521,11 @@ static inline void rcu_preempt_sleep_check(void) { } | |||
521 | * @c: The conditions under which the dereference will take place | 521 | * @c: The conditions under which the dereference will take place |
522 | * | 522 | * |
523 | * Return the value of the specified RCU-protected pointer, but omit | 523 | * Return the value of the specified RCU-protected pointer, but omit |
524 | * both the smp_read_barrier_depends() and the READ_ONCE(). This | 524 | * the READ_ONCE(). This is useful in cases where update-side locks |
525 | * is useful in cases where update-side locks prevent the value of the | 525 | * prevent the value of the pointer from changing. Please note that this |
526 | * pointer from changing. Please note that this primitive does *not* | 526 | * primitive does *not* prevent the compiler from repeating this reference |
527 | * prevent the compiler from repeating this reference or combining it | 527 | * or combining it with other references, so it should not be used without |
528 | * with other references, so it should not be used without protection | 528 | * protection of appropriate locks. |
529 | * of appropriate locks. | ||
530 | * | 529 | * |
531 | * This function is only for update-side use. Using this function | 530 | * This function is only for update-side use. Using this function |
532 | * when protected only by rcu_read_lock() will result in infrequent | 531 | * when protected only by rcu_read_lock() will result in infrequent |