函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:swap_cgroup_cmpxchg - cmpxchg mem_cgroup's id for this swp_entry.*@ent: swap entry to be cmpxchged*@old: old id*@new: new id* Returns old id at success, 0 at failure.* (There is no mem_cgroup using 0 as its id)

函数原型:unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, unsigned short old, unsigned short new)

返回类型:unsigned short

参数:

类型参数名称
swp_entry_tent
unsigned shortold
unsigned shortnew
105  sc等于lookup_swap_cgroup(ent, & ctrl)
107  spin_lock_irqsave( & lock, flags)
108  retval等于id
109  如果retval恒等于oldid等于new
111  否则retval等于0
113  spin_unlock_irqrestore( & lock, flags)
114  返回:retval