Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:string_stream_init

Proto:static int string_stream_init(struct kunit_resource *res, void *context)

Type:int

Parameter:

TypeParameterName
struct kunit_resource *res
void *context
175  ctx = context
177  stream = kunit_kzalloc() - Just like kunit_kmalloc(), but zeroes the allocation.*@test: The test context object.*@size: The size in bytes of the desired memory.*@gfp: flags passed to underlying kmalloc().* See kzalloc() and kunit_kmalloc() for more information.
178  If Not stream Then Return -ENOMEM
181  allocation = stream
182  gfp = gfp
183  test = test
184  Initialization list head
185  Process spin lock initialization( & length and fragments are protected by this lock )
187  Return 0