Sha256: 3f1d809e81fe479a82a454a04ea1219a11969d75d0c8b9ddacb09c630a9af896

Contents?: true

Size: 422 Bytes

Versions: 8

Compression:

Stored size: 422 Bytes

Contents

use crate::fd::OwnedFd;
use crate::{backend, io, path};

pub use backend::fs::types::MemfdFlags;

/// `memfd_create(path, flags)`
///
/// # References
///  - [Linux]
///
/// [Linux]: https://man7.org/linux/man-pages/man2/memfd_create.2.html
#[inline]
pub fn memfd_create<P: path::Arg>(path: P, flags: MemfdFlags) -> io::Result<OwnedFd> {
    path.into_with_c_str(|path| backend::fs::syscalls::memfd_create(path, flags))
}

Version data entries

8 entries across 7 versions & 1 rubygems

Version Path
wasmtime-8.0.0 ./ext/cargo-vendor/rustix-0.36.12/src/fs/memfd_create.rs
wasmtime-7.0.0 ./ext/cargo-vendor/rustix-0.36.11/src/fs/memfd_create.rs
wasmtime-7.0.0 ./ext/cargo-vendor/rustix-0.37.5/src/fs/memfd_create.rs
wasmtime-6.0.1 ./ext/cargo-vendor/rustix-0.36.8/src/fs/memfd_create.rs
wasmtime-6.0.0 ./ext/cargo-vendor/rustix-0.36.8/src/fs/memfd_create.rs
wasmtime-5.0.0 ./ext/cargo-vendor/rustix-0.36.7/src/fs/memfd_create.rs
wasmtime-0.4.1 ./ext/cargo-vendor/rustix-0.36.5/src/fs/memfd_create.rs
wasmtime-0.4.0 ./ext/cargo-vendor/rustix-0.36.5/src/fs/memfd_create.rs