Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Straightforward checks that allocating and freeing IDs work.

Proto:static void ida_check_alloc(struct ida *ida)

Type:void

Parameter:

TypeParameterName
struct ida *ida
35  When i < 10000 cycle IDA_BUG_ON(ida, da_alloc() - Allocate an unused ID.*@ida: IDA handle.*@gfp: Memory allocation flags.* Allocate an ID between 0 and %INT_MAX, inclusive.* Context: Any context.* Return: The allocated ID, or %-ENOMEM if memory could not be allocated, != i)
38  da_free() - Release an allocated ID.*@ida: IDA handle.*@id: Previously allocated ID.* Context: Any context.
39  da_free() - Release an allocated ID.*@ida: IDA handle.*@id: Previously allocated ID.* Context: Any context.
40  When i < 3 cycle
41  id = da_alloc() - Allocate an unused ID.*@ida: IDA handle.*@gfp: Memory allocation flags.* Allocate an ID between 0 and %INT_MAX, inclusive.* Context: Any context.* Return: The allocated ID, or %-ENOMEM if memory could not be allocated,
42  IDA_BUG_ON(ida, id < 0)
43  If i == 2 Then IDA_BUG_ON(ida, id != 10000)
47  When i < 5000 cycle da_free() - Release an allocated ID.*@ida: IDA handle.*@id: Previously allocated ID.* Context: Any context.
50  IDA_BUG_ON(ida, da_alloc_min() - Allocate an unused ID != 10001)
51  da_destroy() - Free all IDs.*@ida: IDA handle.* Calling this function frees all IDs and releases all resources used* by an IDA. When this call returns, the IDA is empty and can be reused* or freed. If the IDA is already empty, there is no need to call this
53  IDA_BUG_ON(ida, !ida_is_empty(ida))
Caller
NameDescribe
ida_checks