函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Workqueue handler to drive one grace period and invoke any callbacks* that become ready as a result. Single-CPU and !PREEMPT operation* means that we get away with murder on synchronization. ;-)

函数原型:void srcu_drive_gp(struct work_struct *wp)

返回类型:void

参数:

类型参数名称
struct work_struct *wp
116  ssp等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(wp, structsrcu_struct, srcu_work)
117  如果 GP workqueue running? 或非READ_ONCE( Pending callbacks: Head. )则返回
121  WRITE_ONCE( GP workqueue running? , true)
122  禁止中断()
123  lh等于 Pending callbacks: Head.
124  Pending callbacks: Head. = NULL
125  Pending callbacks: Tail. 等于 Pending callbacks: Head.
126  开中断()
127  idx等于 Current reader array element.
128  WRITE_ONCE( Current reader array element. , ! Current reader array element. )
129  WRITE_ONCE( GP waiting for readers? , true)
130  swait_event_exclusive(srcu_wq, !READ_ONCE( srcu_read_lock() nesting depth. [idx]))
131  WRITE_ONCE( GP waiting for readers? , false)
134 lh循环
135  rhp等于lh
136  lh等于next
137  local_bh_disable()
138  func(rhp)
139  local_bh_enable()
148  WRITE_ONCE( GP workqueue running? , false)
149  如果READ_ONCE( Pending callbacks: Head. )则schedule_work - put work task in global workqueue*@work: job to be done* Returns %false if @work was already on the kernel-global workqueue and* %true otherwise