Function report |
Source Code:mm\slab_common.c |
Create Date:2022-07-28 14:29:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto: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 *))
Type:struct kmem_cache
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If err Then |
472 | Go to out_unlock |
476 | If flags & ~Common flags permitted for kmem_cache_create Then |
478 | Go to out_unlock |
490 | If WARN_ON(!usersize && useroffset) || WARN_ON(size < usersize || size - usersize < useroffset) Then usersize = useroffset = 0 |
496 | If s Then Go to out_unlock |
500 | If Not cache_name Then |
502 | Go to out_unlock |
513 | out_unlock : |
516 | memcg_put_cache_ids() |
517 | put_online_mems() |
518 | put_online_cpus() |
520 | If err Then |
521 | If flags & Panic if kmem_cache_create() fails Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns. |
524 | Else |
527 | dump_stack() |
529 | Return NULL |
531 | Return s |
Name | Describe |
---|---|
proc_caches_init | |
uts_ns_init | |
kmem_cache_create | kmem_cache_create - Create a cache.*@name: A string which is used in /proc/slabinfo to identify this cache.*@size: The size of objects to be created in this cache.*@align: The required alignment for the objects.*@flags: SLAB flags |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |