Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\percpu-refcount.c Create Date:2022-07-28 06:24:50
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:percpu_ref_kill_and_confirm - drop the initial ref and schedule confirmation*@ref: percpu_ref to kill*@confirm_kill: optional confirmation callback* Equivalent to percpu_ref_kill() but also schedules kill confirmation if*@confirm_kill is not NULL

Proto:void percpu_ref_kill_and_confirm(struct percpu_ref *ref, percpu_ref_func_t *confirm_kill)

Type:void

Parameter:

TypeParameterName
struct percpu_ref *ref
percpu_ref_func_t *confirm_kill
343  spin_lock_irqsave( & percpu_ref_switch_lock, flags)
345  WARN_ONCE(* The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. & __PERCPU_REF_DEAD, "%s called more than once on %ps!", __func__, release)
348  * The low bit of the pointer indicates whether the ref is in percpu * mode; if set, then get/put will manipulate the atomic_t. |= __PERCPU_REF_DEAD
349  __percpu_ref_switch_mode(ref, confirm_kill)
350  percpu_ref_put - decrement a percpu refcount*@ref: percpu_ref to put* Decrement the refcount, and if 0, call the release function (which was passed* to percpu_ref_init())* This function is safe to call as long as @ref is between init and exit.
352  spin_unlock_irqrestore( & percpu_ref_switch_lock, flags)
Caller
NameDescribe
percpu_ref_killpercpu_ref_kill - drop the initial ref*@ref: percpu_ref to kill* Must be used to drop the initial ref on a percpu refcount; must be called* precisely once before shutdown.* Switches @ref into atomic mode before gathering up the percpu counters