函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:xa_cmpxchg() - Conditionally replace an entry in the XArray.*@xa: XArray.*@index: Index into array.*@old: Old value to test against.*@entry: New value to place in array.*@gfp: Memory allocation flags.

函数原型:static inline void *xa_cmpxchg(struct xarray *xa, unsigned long index, void *old, void *entry, gfp_t gfp)

返回类型:void

参数:

类型参数名称
struct xarray *xa
unsigned longindex
void *old
void *entry
gfp_tgfp
687  xa_lock(xa)
688  curr等于__xa_cmpxchg(xa, index, old, entry, gfp)
689  xa_unlock(xa)
691  返回:curr
调用者
名称描述
check_cmpxchg
check_reserve
xa_reservexa_reserve() - Reserve this index in the XArray.*@xa: XArray.*@index: Index into array.*@gfp: Memory allocation flags.* Ensures there is somewhere to store an entry at @index in the array.* If there is already something stored at @index, this function does
xa_releasexa_release() - Release a reserved entry.*@xa: XArray.*@index: Index of entry.* After calling xa_reserve(), you can call this function to release the* reservation. If the entry at @index has been stored to, this function* will do nothing.