函数逻辑报告 |
Source Code:mm\slab_common.c |
Create Date:2022-07-27 15:54:05 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:kmem_cache_create_usercopy - Create a cache with a region suitable* for copying to userspace*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.
函数原型:struct kmem_cache *kmem_cache_create_usercopy(const char *name, unsigned int size, unsigned int align, slab_flags_t flags, unsigned int useroffset, unsigned int usersize, void (*ctor)(void *))
返回类型:struct kmem_cache
参数:
类型 | 参数 | 名称 |
---|---|---|
const char * | name | |
unsigned int | size | |
unsigned int | align | |
slab_flags_t | flags | |
unsigned int | useroffset | |
unsigned int | usersize | |
void (* | ctor |
460 | struct kmem_cache * s = NULL |
464 | get_online_cpus() |
465 | get_online_mems() |
466 | memcg_get_cache_ids() |
468 | mutex_lock( & slab_mutex) |
470 | err等于kmem_cache_sanity_check(name, size) |
471 | 如果err则 |
472 | 转到:out_unlock |
476 | 如果flags按位与Common flags permitted for kmem_cache_create 的反则 |
478 | 转到:out_unlock |
490 | 如果WARN_ON(!usersize && useroffset)或WARN_ON(size < usersize || size - usersize < useroffset)则usersize等于useroffset等于0 |
496 | 如果s则转到:out_unlock |
500 | 如果非cache_name则 |
502 | 转到:out_unlock |
508 | 如果是错误则 |
513 | out_unlock : |
516 | memcg_put_cache_ids() |
517 | put_online_mems() |
518 | put_online_cpus() |
520 | 如果err则 |
521 | 如果flags按位与Panic if kmem_cache_create() fails 则panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns. |
524 | 否则 |
527 | dump_stack() |
529 | 返回:NULL |
531 | 返回:s |
名称 | 描述 |
---|---|
proc_caches_init | 进程缓存初始化 |
uts_ns_init | |
kmem_cache_create | 创建高速缓存区 |
fork_init | 进程创建机制初始化 |
vfs_caches_init | 虚拟文件系统缓存初始化 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |