Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:group_parse_float - parse a floating number*@input: input string*@dec_shift: number of decimal digits to shift*@v: output* Parse a decimal floating point number in @input and store the result in*@v with decimal point right shifted @dec_shift times

Proto:int cgroup_parse_float(const char *input, unsigned dec_shift, s64 *v)

Type:int

Parameter:

TypeParameterName
const char *input
unsigneddec_shift
s64 *v
6206  frac = 0
6207  fstart = 0 , fend = 0
6209  If Not sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments Then Return -EINVAL
6211  If frac < 0 Then Return -EINVAL
6214  flen = If fend > fstart Then fend - fstart Else 0
6215  If flen < dec_shift Then frac *= power_of_ten(dec_shift - flen)
6217  Else frac = Same as above but for u64 dividends. divisor must be a 32-bit* number.(frac, power_of_ten(flen - dec_shift))
6220  v = whole * power_of_ten(dec_shift) + frac
6221  Return 0
Caller
NameDescribe
ioc_qos_write