getrandom
os
0.1.0
getrandom
Sections
参数
返回值
In os::
kernel::
syscall::
sys
os
::
kernel
::
syscall
::
sys
Function
getrandom
Copy item path
Source
pub fn getrandom(buf: *mut c_void, len: c_ulong, _flags: c_uint) -> c_int
Expand description
获取随机字节系统调用
§
参数
buf
: 指向用户空间缓冲区的指针,用于存储随机字节
len
: 最大需要填充的字节数
_flags
: 标志位(当前未使用)
§
返回值
成功
:返回填充的字节数
失败
:返回负的 errno