mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
doc: Fix various RCU docbook comment-header problems
Because many of RCU's files have not been included into docbook, a number of errors have accumulated. This commit fixes them. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
533966c8ad
commit
27fdb35fe9
6 changed files with 33 additions and 21 deletions
|
@ -523,7 +523,7 @@ static inline void rcu_preempt_sleep_check(void) { }
|
|||
* Return the value of the specified RCU-protected pointer, but omit
|
||||
* both the smp_read_barrier_depends() and the READ_ONCE(). This
|
||||
* is useful in cases where update-side locks prevent the value of the
|
||||
* pointer from changing. Please note that this primitive does -not-
|
||||
* pointer from changing. Please note that this primitive does *not*
|
||||
* prevent the compiler from repeating this reference or combining it
|
||||
* with other references, so it should not be used without protection
|
||||
* of appropriate locks.
|
||||
|
@ -568,7 +568,7 @@ static inline void rcu_preempt_sleep_check(void) { }
|
|||
* is handed off from RCU to some other synchronization mechanism, for
|
||||
* example, reference counting or locking. In C11, it would map to
|
||||
* kill_dependency(). It could be used as follows:
|
||||
*
|
||||
* ``
|
||||
* rcu_read_lock();
|
||||
* p = rcu_dereference(gp);
|
||||
* long_lived = is_long_lived(p);
|
||||
|
@ -579,6 +579,7 @@ static inline void rcu_preempt_sleep_check(void) { }
|
|||
* p = rcu_pointer_handoff(p);
|
||||
* }
|
||||
* rcu_read_unlock();
|
||||
*``
|
||||
*/
|
||||
#define rcu_pointer_handoff(p) (p)
|
||||
|
||||
|
@ -778,18 +779,21 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
|
|||
|
||||
/**
|
||||
* RCU_INIT_POINTER() - initialize an RCU protected pointer
|
||||
* @p: The pointer to be initialized.
|
||||
* @v: The value to initialized the pointer to.
|
||||
*
|
||||
* Initialize an RCU-protected pointer in special cases where readers
|
||||
* do not need ordering constraints on the CPU or the compiler. These
|
||||
* special cases are:
|
||||
*
|
||||
* 1. This use of RCU_INIT_POINTER() is NULLing out the pointer -or-
|
||||
* 1. This use of RCU_INIT_POINTER() is NULLing out the pointer *or*
|
||||
* 2. The caller has taken whatever steps are required to prevent
|
||||
* RCU readers from concurrently accessing this pointer -or-
|
||||
* RCU readers from concurrently accessing this pointer *or*
|
||||
* 3. The referenced data structure has already been exposed to
|
||||
* readers either at compile time or via rcu_assign_pointer() -and-
|
||||
* a. You have not made -any- reader-visible changes to
|
||||
* this structure since then -or-
|
||||
* readers either at compile time or via rcu_assign_pointer() *and*
|
||||
*
|
||||
* a. You have not made *any* reader-visible changes to
|
||||
* this structure since then *or*
|
||||
* b. It is OK for readers accessing this structure from its
|
||||
* new location to see the old state of the structure. (For
|
||||
* example, the changes were to statistical counters or to
|
||||
|
@ -805,7 +809,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
|
|||
* by a single external-to-structure RCU-protected pointer, then you may
|
||||
* use RCU_INIT_POINTER() to initialize the internal RCU-protected
|
||||
* pointers, but you must use rcu_assign_pointer() to initialize the
|
||||
* external-to-structure pointer -after- you have completely initialized
|
||||
* external-to-structure pointer *after* you have completely initialized
|
||||
* the reader-accessible portions of the linked structure.
|
||||
*
|
||||
* Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no
|
||||
|
@ -819,6 +823,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
|
|||
|
||||
/**
|
||||
* RCU_POINTER_INITIALIZER() - statically initialize an RCU protected pointer
|
||||
* @p: The pointer to be initialized.
|
||||
* @v: The value to initialized the pointer to.
|
||||
*
|
||||
* GCC-style initialization for an RCU-protected pointer in a structure field.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue