Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:test_parman_create

Proto:static struct test_parman *test_parman_create(const struct parman_ops *ops)

Type:struct test_parman

Parameter:

TypeParameterName
const struct parman_ops *ops
222  test_parman = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
223  If Not test_parman Then Return ERR_PTR( - ENOMEM)
225  err = test_parman_resize(test_parman, TEST_PARMAN_BASE_COUNT)
226  If err Then Go to err_resize
228  parman = parman_create - creates a new parman instance*@ops: caller-specific callbacks*@priv: pointer to a private data passed to the ops* Note: all locking must be provided by the caller.* Each parman instance manages an array area with chunks of entries
229  If Not parman Then
230  err = -ENOMEM
231  Go to err_parman_create
233  test_parman_rnd_init(test_parman)
234  test_parman_prios_init(test_parman)
235  test_parman_items_init(test_parman)
236  run_budget = TEST_PARMAN_RUN_BUDGET
237  Return test_parman
239  err_parman_create :
240  test_parman_resize(test_parman, 0)
241  err_resize :
242  kfree(test_parman)
243  Return ERR_PTR(err)
Caller
NameDescribe
test_parman_lsort