Sha256: 317cdaf243623329ee345131054e86a06a0863a9e90c5dba73e1ac3475ba6305

Contents?: true

Size: 494 Bytes

Versions: 19

Compression:

Stored size: 494 Bytes

Contents

//! linux_raw syscalls supporting `rustix::rand`.
//!
//! # Safety
//!
//! See the `rustix::backend` module documentation for details.
#![allow(unsafe_code, clippy::undocumented_unsafe_blocks)]

use crate::backend::conv::{pass_usize, ret_usize};
use crate::io;
use crate::rand::GetRandomFlags;

#[inline]
pub(crate) unsafe fn getrandom(
    buf: *mut u8,
    cap: usize,
    flags: GetRandomFlags,
) -> io::Result<usize> {
    ret_usize(syscall!(__NR_getrandom, buf, pass_usize(cap), flags))
}

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/rustix-0.38.44/src/backend/linux_raw/rand/syscalls.rs
wasmtime-28.0.0 ./ext/cargo-vendor/rustix-0.38.43/src/backend/linux_raw/rand/syscalls.rs
wasmtime-27.0.0 ./ext/cargo-vendor/rustix-0.38.41/src/backend/linux_raw/rand/syscalls.rs
wasmtime-26.0.0 ./ext/cargo-vendor/rustix-0.38.37/src/backend/linux_raw/rand/syscalls.rs
wasmtime-25.0.2 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-25.0.1 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-25.0.0 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-24.0.0 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-23.0.2 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-22.0.0 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-21.0.1 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-20.0.2 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-20.0.0 ./ext/cargo-vendor/rustix-0.38.34/src/backend/linux_raw/rand/syscalls.rs
wasmtime-18.0.3 ./ext/cargo-vendor/rustix-0.38.28/src/backend/linux_raw/rand/syscalls.rs
wasmtime-17.0.1 ./ext/cargo-vendor/rustix-0.38.28/src/backend/linux_raw/rand/syscalls.rs
wasmtime-17.0.0 ./ext/cargo-vendor/rustix-0.38.28/src/backend/linux_raw/rand/syscalls.rs
wasmtime-16.0.0 ./ext/cargo-vendor/rustix-0.38.28/src/backend/linux_raw/rand/syscalls.rs
wasmtime-15.0.1 ./ext/cargo-vendor/rustix-0.38.28/src/backend/linux_raw/rand/syscalls.rs
wasmtime-15.0.0 ./ext/cargo-vendor/rustix-0.38.28/src/backend/linux_raw/rand/syscalls.rs