From 0090dea50f2d021936cd6eb4dcce9b09bf7c933a Mon Sep 17 00:00:00 2001 From: Peter Limkilde Svendsen Date: Sat, 9 Nov 2024 18:12:58 +0100 Subject: [PATCH] Add docs for sys/random.h --- src/header/sys_random/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/header/sys_random/mod.rs b/src/header/sys_random/mod.rs index 36dfc3b408..1788265917 100644 --- a/src/header/sys_random/mod.rs +++ b/src/header/sys_random/mod.rs @@ -1,3 +1,7 @@ +//! `sys/random.h` implementation. +//! +//! Non-POSIX, see . + use core::slice; use crate::{ @@ -5,9 +9,12 @@ use crate::{ platform::{types::*, Pal, Sys}, }; +/// See . pub const GRND_NONBLOCK: c_uint = 1; +/// See . pub const GRND_RANDOM: c_uint = 2; +/// See . #[no_mangle] pub unsafe extern "C" fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t { Sys::getrandom(