Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rcu\srcutiny.c Create Date:2022-07-28 10:19:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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. ;-)

Proto:void srcu_drive_gp(struct work_struct *wp)

Type:void

Parameter:

TypeParameterName
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  If GP workqueue running? || Not READ_ONCE( Pending callbacks: Head. ) Then Return
121  WRITE_ONCE( GP workqueue running? , true)
122  local_irq_disable()
123  lh = Pending callbacks: Head.
124  Pending callbacks: Head. = NULL
125  Pending callbacks: Tail. = Pending callbacks: Head.
126  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
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  When lh cycle
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  If READ_ONCE( Pending callbacks: Head. ) Then 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