Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\swap_cgroup.c Create Date:2022-07-28 16:15:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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)

Proto:unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, unsigned short old, unsigned short new)

Type:unsigned short

Parameter:

TypeParameterName
swp_entry_tent
unsigned shortold
unsigned shortnew
105  sc = lookup_swap_cgroup(ent, & ctrl)
107  spin_lock_irqsave( & lock, flags)
108  retval = id
109  If retval == old Then id = new
111  Else retval = 0
113  spin_unlock_irqrestore( & lock, flags)
114  Return retval