函数逻辑报告

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

函数名称:percpu_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.

函数原型:static inline bool percpu_ref_tryget(struct percpu_ref *ref)

返回类型:bool

参数:

类型参数名称
struct percpu_ref *ref
223  __percpupercpu_count
226  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
228  如果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
229  this_cpu_inc( * percpu_count)
230  ret = true
231  否则
232  ret等于atomic_long_inc_not_zero( & count)
235  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
237  返回:ret
调用者
名称描述
blk_mq_timeout_work
blk_mq_queue_tag_busy_iterlk_mq_queue_tag_busy_iter - iterate over all requests with a driver tag*@q: Request queue to examine
io_get_req
SYSCALL_DEFINE6
css_trygetss_tryget - try to obtain a reference on the specified css*@css: target css* Obtain a reference on @css unless it already has reached zero and is* being released. This function doesn't care whether @css is on or* offline
blkg_trygetlkg_tryget - try and get a blkg reference*@blkg: blkg to get* This is for use when doing an RCU lookup of the blkg. We may be in the midst* of freeing this blkg, so we can only use it if the refcnt is not zero.