函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Internal helper. Don't use outside percpu-refcount proper. The* function doesn't return the pointer and let the caller test it for NULL* because doing so forces the compiler to generate two conditional

函数原型:static inline bool __ref_is_percpu(struct percpu_ref *ref, unsigned long __percpu **percpu_countp)

返回类型:bool

参数:

类型参数名称
struct percpu_ref *ref
unsigned long __percpu **percpu_countp
161  percpu_ptr等于READ_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.)
169  如果此条件成立可能性小(为编译器优化)(percpu_ptr & __PERCPU_REF_ATOMIC_DEAD)则返回:false
172  percpu_countp等于percpu_ptr
173  返回:true
调用者
名称描述
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
percpu_ref_get_manypercpu计数
percpu_ref_trygetpercpu_ref_tryget - try to increment a percpu refcount*@ref: percpu_ref to try-get* Increment a percpu refcount unless its count already reached zero.* Returns %true on success; %false on failure.
percpu_ref_tryget_livepercpu_ref_tryget_live - try to increment a live percpu refcount*@ref: percpu_ref to try-get* Increment a percpu refcount unless it has already been killed
percpu_ref_put_manypercpu_ref_put_many - decrement a percpu refcount*@ref: percpu_ref to put*@nr: number of references to put* Decrement the refcount, and if 0, call the release function (which was passed* to percpu_ref_init())
percpu_ref_is_zero判断percpu无计数引用