Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\pid_namespace.c Create Date:2022-07-28 11:20:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:reates the kmem cache to allocate pids from.*@level: pid namespace level

Proto:static struct kmem_cache *create_pid_cachep(unsigned int level)

Type:struct kmem_cache

Parameter:

TypeParameterName
unsigned intlevel
40  pkc = Write once array, filled from the beginning. [level - 1]
45  kc = READ_ONCE( * pkc)
46  If kc Then Return kc
49  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
50  len = sizeof(structpid) + level * sizeof(structupid)
51  mutex_lock( & pid_caches_mutex)
53  If Not pkc Then pkc = kmem_cache_create(name, len, 0, Align objs on cache lines , 0)
55  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
57  Return READ_ONCE( * pkc)
Caller
NameDescribe
create_pid_namespace