函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\mempolicy.c Create Date:2022-07-27 17:06:27
Last Modify:2020-03-17 22:28:11 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Insert a new shared policy into the list. Caller holds sp->lock for* writing.

函数原型:static void sp_insert(struct shared_policy *sp, struct sp_node *new)

返回类型:void

参数:

类型参数名称
struct shared_policy *sp
struct sp_node *new
2342  p等于rb_node
2343  struct rb_node * parent = NULL
2346 p循环
2347  parent等于p
2348  nd等于rb_entry(parent, structsp_node, nd)
2349  如果start小于startp等于rb_left
2351  否则如果end大于endp等于rb_right
2353  否则BUG()
2356  rb_link_node( & nd, parent, p)
2357  rb_insert_color( & nd, & root)
2358  pr_debug("inserting %lx-%lx: %d\n", start, end, policy ? See MPOL_* above : 0)
调用者
名称描述
shared_policy_replaceReplace a policy range.