函数逻辑报告 |
Source Code:mm\mempolicy.c |
Create Date:2022-07-27 17:04:58 |
Last Modify:2020-03-17 22:28:11 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Copy a node mask from user space.
函数原型:static int get_nodes(nodemask_t *nodes, const unsigned long __user *nmask, unsigned long maxnode)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
nodemask_t * | nodes | |
const unsigned long __user * | nmask | |
unsigned long | maxnode |
1350 | maxnode先自减 |
1351 | nodes_clear( * nodes) |
1354 | 如果maxnode大于PAGE_SIZE乘BITS_PER_BYTE则返回:负EINVAL |
1357 | nlongs等于BITS_TO_LONGS(maxnode) |
1358 | 如果maxnode取模BITS_PER_LONG恒等于0则endmask等于0UL的反 |
1360 | 否则endmask等于1UL左移maxnode取模BITS_PER_LONG位的值减1 |
1372 | 如果nlongs大于BITS_TO_LONGS(MAX_NUMNODES)则 |
1382 | nlongs等于BITS_TO_LONGS(MAX_NUMNODES) |
1383 | endmask等于0UL的反 |
1386 | 如果maxnode大于MAX_NUMNODES且MAX_NUMNODES取模BITS_PER_LONG不等于0则 |
1387 | valid_mask等于endmask |
1389 | valid_mask与等于1UL左移MAX_NUMNODES取模BITS_PER_LONG位的值减1的差的反 |
1390 | 如果Careful: we have to cast the result to the type of the pointer* for sign reasons(t, nmask + nlongs - 1)则返回:负EFAULT |
1392 | 如果t按位与valid_mask则返回:负EINVAL |
1396 | 如果copy_from_user(nodes_addr( * nodes), nmask, nlongs * sizeof(unsignedlong))则返回:负EFAULT |
1398 | nodes_addr( * nodes)[nlongs - 1]与等于endmask |
1399 | 返回:0 |
名称 | 描述 |
---|---|
kernel_mbind | |
kernel_set_mempolicy | Set the process memory policy |
kernel_migrate_pages |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |