函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rcu\srcutree.c Create Date:2022-07-27 11:19:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:srcu_barrier - Wait until all in-flight call_srcu() callbacks complete.*@ssp: srcu_struct on which to wait for in-flight callbacks.

函数原型:void srcu_barrier(struct srcu_struct *ssp)

返回类型:void

参数:

类型参数名称
struct srcu_struct *ssp
1026  s等于_seq_snap - Take a snapshot of the update side's sequence number.* This function returns the earliest value of the grace-period sequence number* that will indicate that a full grace period has elapsed since the current* time
1028  First-use initialization of statically allocated srcu_struct* structure
1029  mutex_lock( & srcu_barrier_mutex)
1030  如果Given a snapshot from rcu_seq_snap(), determine whether or not a* full update-side operation has occurred.
1031  smp_mb()
1032  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
1033  返回
1035  Adjust sequence number for start of update-side operation.
1036  init_completion( & srcu_barrier_completion)
1039  atomic_set( & srcu_barrier_cpu_cnt, 1)
1049  遍历可用CPU(cpu)
1050  sdp等于per_cpu_ptr(sda, cpu)
1051  spin_lock_irq_rcu_node(sdp)
1052  atomic_inc( & srcu_barrier_cpu_cnt)
1053  func等于Callback function for srcu_barrier() use.
1054  debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally* by call_rcu() and rcu callback execution, and are therefore not part* of the RCU API. These are in rcupdate.h because they are used by all* RCU implementations.
1060  spin_unlock_irq_rcu_node(sdp)
1064  如果atomic_dec_and_test( & srcu_barrier_cpu_cnt)则mplete: - signals a single thread waiting on this completion*@x: holds the state of this particular completion* This will wake up a single thread waiting on this completion. Threads will be* awakened in the same order in which they were queued.
1066  wait_for_completion: - waits for completion of a task*@x: holds the state of this particular completion* This waits to be signaled for completion of a specific task. It is NOT* interruptible and there is no timeout.* See also similar routines (i
1068  Adjust sequence number for end of update-side operation.
1069  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
调用者
名称描述
srcu_torture_barrier
srcu_rcu_barrier