Sha256: eef6aa01830ddd510b83f507da2002c03e58318b73744be2c06ebbe33c4f194f

Contents?: true

Size: 439 Bytes

Versions: 23

Compression:

Stored size: 439 Bytes

Contents

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

use crate::backend::conv::ret_usize_infallible;
use crate::pid::{Pid, RawPid};

#[inline]
pub(crate) fn getpid() -> Pid {
    unsafe {
        let pid = ret_usize_infallible(syscall_readonly!(__NR_getpid)) as RawPid;
        Pid::from_raw_unchecked(pid)
    }
}

Version data entries

23 entries across 23 versions & 1 rubygems

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