Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kfifo.c Create Date:2022-07-28 06:24:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__kfifo_alloc

Proto:int __kfifo_alloc(struct __kfifo *fifo, unsigned int size, size_t esize, gfp_t gfp_mask)

Type:int

Parameter:

TypeParameterName
struct __kfifo *fifo
unsigned intsize
size_tesize
gfp_tgfp_mask
31  size = undup_pow_of_two - round the given value up to nearest power of two*@n: parameter* round the given value up to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(size)
33  in = 0
34  out = 0
35  esize = esize
37  If size < 2 Then
38  data = NULL
39  mask = 0
40  Return -EINVAL
43  data = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
45  If Not data Then
46  mask = 0
47  Return -ENOMEM
49  mask = size - 1
51  Return 0