函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:page_ref_add_unless

函数原型:static inline int page_ref_add_unless(struct page *page, int nr, int u)

返回类型:int

参数:

类型参数名称
struct page *page
intnr
intu
157  ret等于atomic_add_unless - add unless the number is already a given value*@v: pointer of type atomic_t*@a: the amount to add to v...*@u: ...unless v is equal to u.* Atomically adds @a to @v, if @v was not already @u.* Returns true if the addition was done.
159  如果page_ref_tracepoint_active(__tracepoint_page_ref_mod_unless)则__page_ref_mod_unless(page, nr, ret)
161  返回:ret
调用者
名称描述
get_page_unless_zeroTry to grab a ref unless the page has a refcount of zero, return false if* that is the case.* This can be called when MMU is off so it must not access* any of the virtual mappings.
__page_cache_add_speculativespeculatively take a reference to a page