函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kfifo.c Create Date:2022-07-27 07:21:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__kfifo_alloc

函数原型:int __kfifo_alloc(struct __kfifo *fifo, unsigned int size, size_t esize, gfp_t gfp_mask)

返回类型:int

参数:

类型参数名称
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  如果size小于2则
38  data = NULL
39  mask等于0
40  返回:负EINVAL
43  data等于分配数组内存
45  如果非data
46  mask等于0
47  返回:负ENOMEM
49  mask等于size减1
51  返回:0