Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-28 20:22:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:rings_size

Proto:static unsigned long rings_size(unsigned sq_entries, unsigned cq_entries, size_t *sq_offset)

Type:unsigned long

Parameter:

TypeParameterName
unsignedsq_entries
unsignedcq_entries
size_t *sq_offset
4677  off = struct_size() - Calculate size of structure with trailing array.*@p: Pointer to the structure.*@member: Name of the array member.*@n: Number of elements in the array.* Calculates size of memory needed for structure @p followed by an(rings, cqes, cq_entries)
4678  If off == SIZE_MAX Then Return SIZE_MAX
4687  sq_array_size = array_size() - Calculate size of 2-dimensional array.*@a: dimension one*@b: dimension two* Calculates size of 2-dimensional array: @a *@b.* Returns: number of bytes needed to represent the array or SIZE_MAX on* overflow.
4688  If sq_array_size == SIZE_MAX Then Return SIZE_MAX
4691  If For simplicity and code hygiene, the fallback code below insists on* a, b and *d having the same type (similar to the min() and max()* macros), whereas gcc's type-generic overflow checkers accept* different types(off, sq_array_size, & off) Then Return SIZE_MAX
4694  If sq_offset Then sq_offset = off
4697  Return off
Caller
NameDescribe
ring_pages
io_allocate_scq_urings