函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\percpu-refcount.c Create Date:2022-07-27 07:22:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__percpu_ref_switch_mode

函数原型:static void __percpu_ref_switch_mode(struct percpu_ref *ref, percpu_ref_func_t *confirm_switch)

返回类型:void

参数:

类型参数名称
struct percpu_ref *ref
percpu_ref_func_t *confirm_switch
225  lockdep_assert_held( & percpu_ref_switch_lock)
232  wait_event_lock_irq - sleep until a condition gets true(percpu_ref_switch_waitq, !confirm_switch, percpu_ref_switch_lock)
235  如果force_atomic* 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__percpu_ref_switch_to_atomic(ref, confirm_switch)
237  否则__percpu_ref_switch_to_percpu(ref)
调用者
名称描述
percpu_ref_switch_to_atomicpercpu_ref_switch_to_atomic - switch a percpu_ref to atomic mode*@ref: percpu_ref to switch to atomic mode*@confirm_switch: optional confirmation callback* There's no reason to use this function for the usual reference counting.
percpu_ref_switch_to_percpupercpu_ref_switch_to_percpu - switch a percpu_ref to percpu mode*@ref: percpu_ref to switch to percpu mode* There's no reason to use this function for the usual reference counting.* To re-use an expired ref, use percpu_ref_reinit().
percpu_ref_kill_and_confirmpercpu_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
percpu_ref_resurrectpercpu_ref_resurrect - modify a percpu refcount from dead to live*@ref: perpcu_ref to resurrect* Modify @ref so that it's in the same state as before percpu_ref_kill() was* called