函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mmget() - Pin the address space associated with a &struct mm_struct.*@mm: The address space to pin.* Make sure that the address space of the given &struct mm_struct doesn't* go away. This does not protect against parts of the address space being

函数原型:static inline void mmget(struct mm_struct *mm)

返回类型:void

参数:

类型参数名称
struct mm_struct *mm
95  atomic_inc( & *@mm_users: The number of users including userspace. * Use mmget()/mmget_not_zero()/mmput() to modify. When this * drops to 0 (i.e. when the task exits and there are no other * temporary reference holders), we also release a reference on *@mm_count (which )
调用者
名称描述
get_task_mmget_task_mm - acquire a reference to the task's mm* Returns %NULL if the task has no mm. Checks PF_KTHREAD (meaning* this kernel workthread has transiently adopted a user mm with use_mm,* to do its AIO) is not set and if so returns a reference to it, after
copy_mm复制内存
try_to_unuseIf the boolean frontswap is true, only unuse pages_to_unuse pages;* pages_to_unuse==0 means all pages; ignored if frontswap is false