函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mlock.c Create Date:2022-07-27 16:13:40
Last Modify:2022-05-23 14:12:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Take the MCL_* flags passed into mlockall (or 0 if called from munlockall)* and translate into the appropriate modifications to mm->def_flags and/or the* flags for all current VMAs.* There are a couple of subtleties with this

函数原型:static int apply_mlockall_flags(int flags)

返回类型:int

参数:

类型参数名称
intflags
765  struct vm_area_struct * vma, * prev = NULL
766  to_add等于0
768  def_flags与等于This mask is used to clear all the VMA flags used by mlock
769  如果flags按位与lock all future mappings
770  def_flags或等于VM_LOCKED
772  如果flags按位与lock all pages that are faulted in def_flags或等于Lock the pages covered when they are faulted in
775  如果非flags按位与lock all current mappings 的值则转到:out
779  如果flags按位与lock all current mappings
780  to_add或等于VM_LOCKED
781  如果flags按位与lock all pages that are faulted in to_add或等于Lock the pages covered when they are faulted in
785 vma循环
788  newflags等于Flags, see mm.h. 按位与This mask is used to clear all the VMA flags used by mlock
789  newflags或等于to_add
792  mlock_fixup - handle mlock[all]/munlock[all] requests.* Filters out "special" vmas -- VM_LOCKED never gets set for these, and* munlock is a no-op. However, for some special vmas, we go ahead and* populate the ptes.
793  cond_resched()
795  out :
796  返回:0
调用者
名称描述
SYSCALL_DEFINE1
sys_munlockall