函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\random32.c Create Date:2022-07-27 07:16:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:prandom_bytes_state - get the requested number of pseudo-random bytes*@state: pointer to state structure holding seeded state.*@buf: where to copy the pseudo-random bytes to*@bytes: the requested number of bytes

函数原型:void prandom_bytes_state(struct rnd_state *state, void *buf, size_t bytes)

返回类型:void

参数:

类型参数名称
struct rnd_state *state
void *buf
size_tbytes
103  ptr等于buf
105 bytes大于等于sizeof(u32)循环
106  put_unaligned(prandom_u32_state(state), (u32 * )ptr)
107  ptr加等于sizeof(u32)
108  bytes减等于sizeof(u32)
111  如果bytes大于0则
112  rem等于prandom_u32_state(state)
113  循环
114  ptr自加等于rem
115  bytes自减
116  rem右移等于BITS_PER_BYTE
117 bytes大于0循环
调用者
名称描述
prandom_bytes 获取伪随机数的请求数