Skip to main content

libc/unix/linux_like/linux/gnu/b64/x86_64/
mod.rs

1//! x86_64-specific definitions for 64-bit linux-like values
2
3use crate::prelude::*;
4use crate::{
5    off64_t,
6    off_t,
7};
8
9pub type wchar_t = i32;
10pub type nlink_t = u64;
11pub type blksize_t = i64;
12pub type greg_t = i64;
13pub type suseconds_t = i64;
14
15#[repr(C)]
#[allow(deprecated)]
pub struct statfs {
    pub f_type: crate::__fsword_t,
    pub f_bsize: crate::__fsword_t,
    pub f_blocks: crate::fsblkcnt_t,
    pub f_bfree: crate::fsblkcnt_t,
    pub f_bavail: crate::fsblkcnt_t,
    pub f_files: crate::fsfilcnt_t,
    pub f_ffree: crate::fsfilcnt_t,
    pub f_fsid: crate::fsid_t,
    pub f_namelen: crate::__fsword_t,
    pub f_frsize: crate::__fsword_t,
    f_spare: Padding<[crate::__fsword_t; 5]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for statfs { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for statfs {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<crate::fsblkcnt_t>;
        let _: ::core::clone::AssertParamIsClone<crate::fsblkcnt_t>;
        let _: ::core::clone::AssertParamIsClone<crate::fsblkcnt_t>;
        let _: ::core::clone::AssertParamIsClone<crate::fsfilcnt_t>;
        let _: ::core::clone::AssertParamIsClone<crate::fsfilcnt_t>;
        let _: ::core::clone::AssertParamIsClone<crate::fsid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _:
                ::core::clone::AssertParamIsClone<Padding<[crate::__fsword_t; 5]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for statfs { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for statfs {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["f_type", "f_bsize", "f_blocks", "f_bfree", "f_bavail",
                        "f_files", "f_ffree", "f_fsid", "f_namelen", "f_frsize",
                        "f_spare"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.f_type, &self.f_bsize, &self.f_blocks, &self.f_bfree,
                        &self.f_bavail, &self.f_files, &self.f_ffree, &self.f_fsid,
                        &self.f_namelen, &self.f_frsize, &&self.f_spare];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "statfs", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct flock {
    pub l_type: c_short,
    pub l_whence: c_short,
    pub l_start: off_t,
    pub l_len: off_t,
    pub l_pid: crate::pid_t,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for flock { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for flock {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_short>;
        let _: ::core::clone::AssertParamIsClone<off_t>;
        let _: ::core::clone::AssertParamIsClone<crate::pid_t>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for flock { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for flock {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "flock",
            "l_type", &self.l_type, "l_whence", &self.l_whence, "l_start",
            &self.l_start, "l_len", &self.l_len, "l_pid", &&self.l_pid)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct flock64 {
    pub l_type: c_short,
    pub l_whence: c_short,
    pub l_start: off64_t,
    pub l_len: off64_t,
    pub l_pid: crate::pid_t,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for flock64 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for flock64 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_short>;
        let _: ::core::clone::AssertParamIsClone<off64_t>;
        let _: ::core::clone::AssertParamIsClone<crate::pid_t>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for flock64 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for flock64 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "flock64",
            "l_type", &self.l_type, "l_whence", &self.l_whence, "l_start",
            &self.l_start, "l_len", &self.l_len, "l_pid", &&self.l_pid)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct stack_t {
    pub ss_sp: *mut c_void,
    pub ss_flags: c_int,
    pub ss_size: size_t,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for stack_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for stack_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<*mut c_void>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<size_t>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for stack_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for stack_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "stack_t",
            "ss_sp", &self.ss_sp, "ss_flags", &self.ss_flags, "ss_size",
            &&self.ss_size)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct stat {
    pub st_dev: crate::dev_t,
    pub st_ino: crate::ino_t,
    pub st_nlink: crate::nlink_t,
    pub st_mode: crate::mode_t,
    pub st_uid: crate::uid_t,
    pub st_gid: crate::gid_t,
    __pad0: Padding<c_int>,
    pub st_rdev: crate::dev_t,
    pub st_size: off_t,
    pub st_blksize: crate::blksize_t,
    pub st_blocks: crate::blkcnt_t,
    pub st_atime: crate::time_t,
    pub st_atime_nsec: i64,
    pub st_mtime: crate::time_t,
    pub st_mtime_nsec: i64,
    pub st_ctime: crate::time_t,
    pub st_ctime_nsec: i64,
    __unused: Padding<[i64; 3]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for stat { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for stat {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::dev_t>;
        let _: ::core::clone::AssertParamIsClone<crate::ino_t>;
        let _: ::core::clone::AssertParamIsClone<crate::nlink_t>;
        let _: ::core::clone::AssertParamIsClone<crate::mode_t>;
        let _: ::core::clone::AssertParamIsClone<crate::uid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::gid_t>;
        let _: ::core::clone::AssertParamIsClone<Padding<c_int>>;
        let _: ::core::clone::AssertParamIsClone<crate::dev_t>;
        let _: ::core::clone::AssertParamIsClone<off_t>;
        let _: ::core::clone::AssertParamIsClone<crate::blksize_t>;
        let _: ::core::clone::AssertParamIsClone<crate::blkcnt_t>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<i64>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<Padding<[i64; 3]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for stat { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for stat {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["st_dev", "st_ino", "st_nlink", "st_mode", "st_uid", "st_gid",
                        "__pad0", "st_rdev", "st_size", "st_blksize", "st_blocks",
                        "st_atime", "st_atime_nsec", "st_mtime", "st_mtime_nsec",
                        "st_ctime", "st_ctime_nsec", "__unused"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.st_dev, &self.st_ino, &self.st_nlink, &self.st_mode,
                        &self.st_uid, &self.st_gid, &self.__pad0, &self.st_rdev,
                        &self.st_size, &self.st_blksize, &self.st_blocks,
                        &self.st_atime, &self.st_atime_nsec, &self.st_mtime,
                        &self.st_mtime_nsec, &self.st_ctime, &self.st_ctime_nsec,
                        &&self.__unused];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "stat", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct stat64 {
    pub st_dev: crate::dev_t,
    pub st_ino: crate::ino64_t,
    pub st_nlink: crate::nlink_t,
    pub st_mode: crate::mode_t,
    pub st_uid: crate::uid_t,
    pub st_gid: crate::gid_t,
    __pad0: Padding<c_int>,
    pub st_rdev: crate::dev_t,
    pub st_size: off_t,
    pub st_blksize: crate::blksize_t,
    pub st_blocks: crate::blkcnt64_t,
    pub st_atime: crate::time_t,
    pub st_atime_nsec: i64,
    pub st_mtime: crate::time_t,
    pub st_mtime_nsec: i64,
    pub st_ctime: crate::time_t,
    pub st_ctime_nsec: i64,
    __reserved: Padding<[i64; 3]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for stat64 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for stat64 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::dev_t>;
        let _: ::core::clone::AssertParamIsClone<crate::ino64_t>;
        let _: ::core::clone::AssertParamIsClone<crate::nlink_t>;
        let _: ::core::clone::AssertParamIsClone<crate::mode_t>;
        let _: ::core::clone::AssertParamIsClone<crate::uid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::gid_t>;
        let _: ::core::clone::AssertParamIsClone<Padding<c_int>>;
        let _: ::core::clone::AssertParamIsClone<crate::dev_t>;
        let _: ::core::clone::AssertParamIsClone<off_t>;
        let _: ::core::clone::AssertParamIsClone<crate::blksize_t>;
        let _: ::core::clone::AssertParamIsClone<crate::blkcnt64_t>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<i64>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<Padding<[i64; 3]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for stat64 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for stat64 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["st_dev", "st_ino", "st_nlink", "st_mode", "st_uid", "st_gid",
                        "__pad0", "st_rdev", "st_size", "st_blksize", "st_blocks",
                        "st_atime", "st_atime_nsec", "st_mtime", "st_mtime_nsec",
                        "st_ctime", "st_ctime_nsec", "__reserved"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.st_dev, &self.st_ino, &self.st_nlink, &self.st_mode,
                        &self.st_uid, &self.st_gid, &self.__pad0, &self.st_rdev,
                        &self.st_size, &self.st_blksize, &self.st_blocks,
                        &self.st_atime, &self.st_atime_nsec, &self.st_mtime,
                        &self.st_mtime_nsec, &self.st_ctime, &self.st_ctime_nsec,
                        &&self.__reserved];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "stat64", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct statfs64 {
    pub f_type: crate::__fsword_t,
    pub f_bsize: crate::__fsword_t,
    pub f_blocks: u64,
    pub f_bfree: u64,
    pub f_bavail: u64,
    pub f_files: u64,
    pub f_ffree: u64,
    pub f_fsid: crate::fsid_t,
    pub f_namelen: crate::__fsword_t,
    pub f_frsize: crate::__fsword_t,
    pub f_flags: crate::__fsword_t,
    pub f_spare: [crate::__fsword_t; 4],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for statfs64 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for statfs64 {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<u64>;
        let _: ::core::clone::AssertParamIsClone<crate::fsid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<crate::__fsword_t>;
        let _: ::core::clone::AssertParamIsClone<[crate::__fsword_t; 4]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for statfs64 { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for statfs64 {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["f_type", "f_bsize", "f_blocks", "f_bfree", "f_bavail",
                        "f_files", "f_ffree", "f_fsid", "f_namelen", "f_frsize",
                        "f_flags", "f_spare"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.f_type, &self.f_bsize, &self.f_blocks, &self.f_bfree,
                        &self.f_bavail, &self.f_files, &self.f_ffree, &self.f_fsid,
                        &self.f_namelen, &self.f_frsize, &self.f_flags,
                        &&self.f_spare];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "statfs64",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct pthread_attr_t {
    __size: [u64; 7],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for pthread_attr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for pthread_attr_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[u64; 7]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for pthread_attr_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for pthread_attr_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "pthread_attr_t", "__size", &&self.__size)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct _libc_fpxreg {
    pub significand: [u16; 4],
    pub exponent: u16,
    __private: [u16; 3],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for _libc_fpxreg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for _libc_fpxreg {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[u16; 4]>;
        let _: ::core::clone::AssertParamIsClone<u16>;
        let _: ::core::clone::AssertParamIsClone<[u16; 3]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for _libc_fpxreg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for _libc_fpxreg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "_libc_fpxreg",
            "significand", &self.significand, "exponent", &self.exponent,
            "__private", &&self.__private)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct _libc_xmmreg {
    pub element: [u32; 4],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for _libc_xmmreg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for _libc_xmmreg {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[u32; 4]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for _libc_xmmreg { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for _libc_xmmreg {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f, "_libc_xmmreg",
            "element", &&self.element)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct _libc_fpstate {
    pub cwd: u16,
    pub swd: u16,
    pub ftw: u16,
    pub fop: u16,
    pub rip: u64,
    pub rdp: u64,
    pub mxcsr: u32,
    pub mxcr_mask: u32,
    pub _st: [_libc_fpxreg; 8],
    pub _xmm: [_libc_xmmreg; 16],
    __private: [u64; 12],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for _libc_fpstate { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for _libc_fpstate {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<u16>;
        let _: ::core::clone::AssertParamIsClone<u64>;
        let _: ::core::clone::AssertParamIsClone<u32>;
        let _: ::core::clone::AssertParamIsClone<[_libc_fpxreg; 8]>;
        let _: ::core::clone::AssertParamIsClone<[_libc_xmmreg; 16]>;
        let _: ::core::clone::AssertParamIsClone<[u64; 12]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for _libc_fpstate { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for _libc_fpstate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["cwd", "swd", "ftw", "fop", "rip", "rdp", "mxcsr", "mxcr_mask",
                        "_st", "_xmm", "__private"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.cwd, &self.swd, &self.ftw, &self.fop, &self.rip,
                        &self.rdp, &self.mxcsr, &self.mxcr_mask, &self._st,
                        &self._xmm, &&self.__private];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "_libc_fpstate",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct user_regs_struct {
    pub r15: c_ulonglong,
    pub r14: c_ulonglong,
    pub r13: c_ulonglong,
    pub r12: c_ulonglong,
    pub rbp: c_ulonglong,
    pub rbx: c_ulonglong,
    pub r11: c_ulonglong,
    pub r10: c_ulonglong,
    pub r9: c_ulonglong,
    pub r8: c_ulonglong,
    pub rax: c_ulonglong,
    pub rcx: c_ulonglong,
    pub rdx: c_ulonglong,
    pub rsi: c_ulonglong,
    pub rdi: c_ulonglong,
    pub orig_rax: c_ulonglong,
    pub rip: c_ulonglong,
    pub cs: c_ulonglong,
    pub eflags: c_ulonglong,
    pub rsp: c_ulonglong,
    pub ss: c_ulonglong,
    pub fs_base: c_ulonglong,
    pub gs_base: c_ulonglong,
    pub ds: c_ulonglong,
    pub es: c_ulonglong,
    pub fs: c_ulonglong,
    pub gs: c_ulonglong,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for user_regs_struct { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for user_regs_struct {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_ulonglong>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for user_regs_struct { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for user_regs_struct {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["r15", "r14", "r13", "r12", "rbp", "rbx", "r11", "r10", "r9",
                        "r8", "rax", "rcx", "rdx", "rsi", "rdi", "orig_rax", "rip",
                        "cs", "eflags", "rsp", "ss", "fs_base", "gs_base", "ds",
                        "es", "fs", "gs"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.r15, &self.r14, &self.r13, &self.r12, &self.rbp,
                        &self.rbx, &self.r11, &self.r10, &self.r9, &self.r8,
                        &self.rax, &self.rcx, &self.rdx, &self.rsi, &self.rdi,
                        &self.orig_rax, &self.rip, &self.cs, &self.eflags,
                        &self.rsp, &self.ss, &self.fs_base, &self.gs_base, &self.ds,
                        &self.es, &self.fs, &&self.gs];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "user_regs_struct", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct user {
    pub regs: user_regs_struct,
    pub u_fpvalid: c_int,
    pub i387: user_fpregs_struct,
    pub u_tsize: c_ulonglong,
    pub u_dsize: c_ulonglong,
    pub u_ssize: c_ulonglong,
    pub start_code: c_ulonglong,
    pub start_stack: c_ulonglong,
    pub signal: c_longlong,
    __reserved: Padding<c_int>,
    pub u_ar0: *mut user_regs_struct,
    pub u_fpstate: *mut user_fpregs_struct,
    pub magic: c_ulonglong,
    pub u_comm: [c_char; 32],
    pub u_debugreg: [c_ulonglong; 8],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for user { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for user {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<user_regs_struct>;
        let _: ::core::clone::AssertParamIsClone<c_int>;
        let _: ::core::clone::AssertParamIsClone<user_fpregs_struct>;
        let _: ::core::clone::AssertParamIsClone<c_ulonglong>;
        let _: ::core::clone::AssertParamIsClone<c_longlong>;
        let _: ::core::clone::AssertParamIsClone<Padding<c_int>>;
        let _: ::core::clone::AssertParamIsClone<*mut user_regs_struct>;
        let _: ::core::clone::AssertParamIsClone<*mut user_fpregs_struct>;
        let _: ::core::clone::AssertParamIsClone<[c_char; 32]>;
        let _: ::core::clone::AssertParamIsClone<[c_ulonglong; 8]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for user { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for user {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["regs", "u_fpvalid", "i387", "u_tsize", "u_dsize", "u_ssize",
                        "start_code", "start_stack", "signal", "__reserved",
                        "u_ar0", "u_fpstate", "magic", "u_comm", "u_debugreg"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.regs, &self.u_fpvalid, &self.i387, &self.u_tsize,
                        &self.u_dsize, &self.u_ssize, &self.start_code,
                        &self.start_stack, &self.signal, &self.__reserved,
                        &self.u_ar0, &self.u_fpstate, &self.magic, &self.u_comm,
                        &&self.u_debugreg];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "user", names,
            values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct mcontext_t {
    pub gregs: [greg_t; 23],
    pub fpregs: *mut _libc_fpstate,
    __private: [u64; 8],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for mcontext_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for mcontext_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[greg_t; 23]>;
        let _: ::core::clone::AssertParamIsClone<*mut _libc_fpstate>;
        let _: ::core::clone::AssertParamIsClone<[u64; 8]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for mcontext_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for mcontext_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "mcontext_t",
            "gregs", &self.gregs, "fpregs", &self.fpregs, "__private",
            &&self.__private)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ipc_perm {
    pub __key: crate::key_t,
    pub uid: crate::uid_t,
    pub gid: crate::gid_t,
    pub cuid: crate::uid_t,
    pub cgid: crate::gid_t,
    pub mode: c_ushort,
    __pad1: Padding<c_ushort>,
    pub __seq: c_ushort,
    __pad2: Padding<c_ushort>,
    __unused1: Padding<u64>,
    __unused2: Padding<u64>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ipc_perm { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ipc_perm {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::key_t>;
        let _: ::core::clone::AssertParamIsClone<crate::uid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::gid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::uid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::gid_t>;
        let _: ::core::clone::AssertParamIsClone<c_ushort>;
        let _: ::core::clone::AssertParamIsClone<Padding<c_ushort>>;
        let _: ::core::clone::AssertParamIsClone<Padding<c_ushort>>;
        let _: ::core::clone::AssertParamIsClone<Padding<u64>>;
        let _: ::core::clone::AssertParamIsClone<Padding<u64>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ipc_perm { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ipc_perm {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["__key", "uid", "gid", "cuid", "cgid", "mode", "__pad1",
                        "__seq", "__pad2", "__unused1", "__unused2"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.__key, &self.uid, &self.gid, &self.cuid, &self.cgid,
                        &self.mode, &self.__pad1, &self.__seq, &self.__pad2,
                        &self.__unused1, &&self.__unused2];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "ipc_perm",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct shmid_ds {
    pub shm_perm: crate::ipc_perm,
    pub shm_segsz: size_t,
    pub shm_atime: crate::time_t,
    pub shm_dtime: crate::time_t,
    pub shm_ctime: crate::time_t,
    pub shm_cpid: crate::pid_t,
    pub shm_lpid: crate::pid_t,
    pub shm_nattch: crate::shmatt_t,
    __unused4: Padding<u64>,
    __unused5: Padding<u64>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for shmid_ds { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for shmid_ds {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::ipc_perm>;
        let _: ::core::clone::AssertParamIsClone<size_t>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<crate::time_t>;
        let _: ::core::clone::AssertParamIsClone<crate::pid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::pid_t>;
        let _: ::core::clone::AssertParamIsClone<crate::shmatt_t>;
        let _: ::core::clone::AssertParamIsClone<Padding<u64>>;
        let _: ::core::clone::AssertParamIsClone<Padding<u64>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for shmid_ds { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for shmid_ds {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["shm_perm", "shm_segsz", "shm_atime", "shm_dtime", "shm_ctime",
                        "shm_cpid", "shm_lpid", "shm_nattch", "__unused4",
                        "__unused5"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.shm_perm, &self.shm_segsz, &self.shm_atime,
                        &self.shm_dtime, &self.shm_ctime, &self.shm_cpid,
                        &self.shm_lpid, &self.shm_nattch, &self.__unused4,
                        &&self.__unused5];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "shmid_ds",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ptrace_rseq_configuration {
    pub rseq_abi_pointer: crate::__u64,
    pub rseq_abi_size: crate::__u32,
    pub signature: crate::__u32,
    pub flags: crate::__u32,
    pub pad: crate::__u32,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ptrace_rseq_configuration { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ptrace_rseq_configuration {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<crate::__u64>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        let _: ::core::clone::AssertParamIsClone<crate::__u32>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ptrace_rseq_configuration { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ptrace_rseq_configuration {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f,
            "ptrace_rseq_configuration", "rseq_abi_pointer",
            &self.rseq_abi_pointer, "rseq_abi_size", &self.rseq_abi_size,
            "signature", &self.signature, "flags", &self.flags, "pad",
            &&self.pad)
    }
}
#[repr(C)]
#[allow(deprecated)]
#[repr(align(8))]
pub struct clone_args {
    pub flags: c_ulonglong,
    pub pidfd: c_ulonglong,
    pub child_tid: c_ulonglong,
    pub parent_tid: c_ulonglong,
    pub exit_signal: c_ulonglong,
    pub stack: c_ulonglong,
    pub stack_size: c_ulonglong,
    pub tls: c_ulonglong,
    pub set_tid: c_ulonglong,
    pub set_tid_size: c_ulonglong,
    pub cgroup: c_ulonglong,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for clone_args { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for clone_args {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_ulonglong>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for clone_args { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for clone_args {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["flags", "pidfd", "child_tid", "parent_tid", "exit_signal",
                        "stack", "stack_size", "tls", "set_tid", "set_tid_size",
                        "cgroup"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.flags, &self.pidfd, &self.child_tid, &self.parent_tid,
                        &self.exit_signal, &self.stack, &self.stack_size, &self.tls,
                        &self.set_tid, &self.set_tid_size, &&self.cgroup];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "clone_args",
            names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct user_fpregs_struct {
    pub cwd: c_ushort,
    pub swd: c_ushort,
    pub ftw: c_ushort,
    pub fop: c_ushort,
    pub rip: c_ulonglong,
    pub rdp: c_ulonglong,
    pub mxcsr: c_uint,
    pub mxcr_mask: c_uint,
    pub st_space: [c_uint; 32],
    pub xmm_space: [c_uint; 64],
    padding: Padding<[c_uint; 24]>,
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for user_fpregs_struct { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for user_fpregs_struct {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_ushort>;
        let _: ::core::clone::AssertParamIsClone<c_ulonglong>;
        let _: ::core::clone::AssertParamIsClone<c_uint>;
        let _: ::core::clone::AssertParamIsClone<[c_uint; 32]>;
        let _: ::core::clone::AssertParamIsClone<[c_uint; 64]>;
        let _: ::core::clone::AssertParamIsClone<Padding<[c_uint; 24]>>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for user_fpregs_struct { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for user_fpregs_struct {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["cwd", "swd", "ftw", "fop", "rip", "rdp", "mxcsr", "mxcr_mask",
                        "st_space", "xmm_space", "padding"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.cwd, &self.swd, &self.ftw, &self.fop, &self.rip,
                        &self.rdp, &self.mxcsr, &self.mxcr_mask, &self.st_space,
                        &self.xmm_space, &&self.padding];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "user_fpregs_struct", names, values)
    }
}
#[repr(C)]
#[allow(deprecated)]
pub struct ucontext_t {
    pub uc_flags: c_ulong,
    pub uc_link: *mut ucontext_t,
    pub uc_stack: crate::stack_t,
    pub uc_mcontext: mcontext_t,
    pub uc_sigmask: crate::sigset_t,
    __private: [u8; 512],
    __ssp: [c_ulonglong; 4],
}
#[automatically_derived]
#[doc(hidden)]
#[allow(deprecated)]
unsafe impl ::core::clone::TrivialClone for ucontext_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::clone::Clone for ucontext_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<c_ulong>;
        let _: ::core::clone::AssertParamIsClone<*mut ucontext_t>;
        let _: ::core::clone::AssertParamIsClone<crate::stack_t>;
        let _: ::core::clone::AssertParamIsClone<mcontext_t>;
        let _: ::core::clone::AssertParamIsClone<crate::sigset_t>;
        let _: ::core::clone::AssertParamIsClone<[u8; 512]>;
        let _: ::core::clone::AssertParamIsClone<[c_ulonglong; 4]>;
        *self
    }
}
#[automatically_derived]
#[allow(deprecated)]
impl ::core::marker::Copy for ucontext_t { }
#[automatically_derived]
#[allow(deprecated)]
impl ::core::fmt::Debug for ucontext_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["uc_flags", "uc_link", "uc_stack", "uc_mcontext", "uc_sigmask",
                        "__private", "__ssp"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.uc_flags, &self.uc_link, &self.uc_stack,
                        &self.uc_mcontext, &self.uc_sigmask, &self.__private,
                        &&self.__ssp];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "ucontext_t",
            names, values)
    }
}s! {
16    pub struct statfs {
17        pub f_type: crate::__fsword_t,
18        pub f_bsize: crate::__fsword_t,
19        pub f_blocks: crate::fsblkcnt_t,
20        pub f_bfree: crate::fsblkcnt_t,
21        pub f_bavail: crate::fsblkcnt_t,
22
23        pub f_files: crate::fsfilcnt_t,
24        pub f_ffree: crate::fsfilcnt_t,
25        pub f_fsid: crate::fsid_t,
26
27        pub f_namelen: crate::__fsword_t,
28        pub f_frsize: crate::__fsword_t,
29        f_spare: Padding<[crate::__fsword_t; 5]>,
30    }
31
32    pub struct flock {
33        pub l_type: c_short,
34        pub l_whence: c_short,
35        pub l_start: off_t,
36        pub l_len: off_t,
37        pub l_pid: crate::pid_t,
38    }
39
40    pub struct flock64 {
41        pub l_type: c_short,
42        pub l_whence: c_short,
43        pub l_start: off64_t,
44        pub l_len: off64_t,
45        pub l_pid: crate::pid_t,
46    }
47
48    pub struct stack_t {
49        pub ss_sp: *mut c_void,
50        pub ss_flags: c_int,
51        pub ss_size: size_t,
52    }
53
54    pub struct stat {
55        pub st_dev: crate::dev_t,
56        pub st_ino: crate::ino_t,
57        pub st_nlink: crate::nlink_t,
58        pub st_mode: crate::mode_t,
59        pub st_uid: crate::uid_t,
60        pub st_gid: crate::gid_t,
61        __pad0: Padding<c_int>,
62        pub st_rdev: crate::dev_t,
63        pub st_size: off_t,
64        pub st_blksize: crate::blksize_t,
65        pub st_blocks: crate::blkcnt_t,
66        pub st_atime: crate::time_t,
67        pub st_atime_nsec: i64,
68        pub st_mtime: crate::time_t,
69        pub st_mtime_nsec: i64,
70        pub st_ctime: crate::time_t,
71        pub st_ctime_nsec: i64,
72        __unused: Padding<[i64; 3]>,
73    }
74
75    pub struct stat64 {
76        pub st_dev: crate::dev_t,
77        pub st_ino: crate::ino64_t,
78        pub st_nlink: crate::nlink_t,
79        pub st_mode: crate::mode_t,
80        pub st_uid: crate::uid_t,
81        pub st_gid: crate::gid_t,
82        __pad0: Padding<c_int>,
83        pub st_rdev: crate::dev_t,
84        pub st_size: off_t,
85        pub st_blksize: crate::blksize_t,
86        pub st_blocks: crate::blkcnt64_t,
87        pub st_atime: crate::time_t,
88        pub st_atime_nsec: i64,
89        pub st_mtime: crate::time_t,
90        pub st_mtime_nsec: i64,
91        pub st_ctime: crate::time_t,
92        pub st_ctime_nsec: i64,
93        __reserved: Padding<[i64; 3]>,
94    }
95
96    pub struct statfs64 {
97        pub f_type: crate::__fsword_t,
98        pub f_bsize: crate::__fsword_t,
99        pub f_blocks: u64,
100        pub f_bfree: u64,
101        pub f_bavail: u64,
102        pub f_files: u64,
103        pub f_ffree: u64,
104        pub f_fsid: crate::fsid_t,
105        pub f_namelen: crate::__fsword_t,
106        pub f_frsize: crate::__fsword_t,
107        pub f_flags: crate::__fsword_t,
108        pub f_spare: [crate::__fsword_t; 4],
109    }
110
111    pub struct pthread_attr_t {
112        #[cfg(target_pointer_width = "32")]
113        __size: [u32; 8],
114        #[cfg(target_pointer_width = "64")]
115        __size: [u64; 7],
116    }
117
118    pub struct _libc_fpxreg {
119        pub significand: [u16; 4],
120        pub exponent: u16,
121        __private: [u16; 3],
122    }
123
124    pub struct _libc_xmmreg {
125        pub element: [u32; 4],
126    }
127
128    pub struct _libc_fpstate {
129        pub cwd: u16,
130        pub swd: u16,
131        pub ftw: u16,
132        pub fop: u16,
133        pub rip: u64,
134        pub rdp: u64,
135        pub mxcsr: u32,
136        pub mxcr_mask: u32,
137        pub _st: [_libc_fpxreg; 8],
138        pub _xmm: [_libc_xmmreg; 16],
139        __private: [u64; 12],
140    }
141
142    pub struct user_regs_struct {
143        pub r15: c_ulonglong,
144        pub r14: c_ulonglong,
145        pub r13: c_ulonglong,
146        pub r12: c_ulonglong,
147        pub rbp: c_ulonglong,
148        pub rbx: c_ulonglong,
149        pub r11: c_ulonglong,
150        pub r10: c_ulonglong,
151        pub r9: c_ulonglong,
152        pub r8: c_ulonglong,
153        pub rax: c_ulonglong,
154        pub rcx: c_ulonglong,
155        pub rdx: c_ulonglong,
156        pub rsi: c_ulonglong,
157        pub rdi: c_ulonglong,
158        pub orig_rax: c_ulonglong,
159        pub rip: c_ulonglong,
160        pub cs: c_ulonglong,
161        pub eflags: c_ulonglong,
162        pub rsp: c_ulonglong,
163        pub ss: c_ulonglong,
164        pub fs_base: c_ulonglong,
165        pub gs_base: c_ulonglong,
166        pub ds: c_ulonglong,
167        pub es: c_ulonglong,
168        pub fs: c_ulonglong,
169        pub gs: c_ulonglong,
170    }
171
172    pub struct user {
173        pub regs: user_regs_struct,
174        pub u_fpvalid: c_int,
175        pub i387: user_fpregs_struct,
176        pub u_tsize: c_ulonglong,
177        pub u_dsize: c_ulonglong,
178        pub u_ssize: c_ulonglong,
179        pub start_code: c_ulonglong,
180        pub start_stack: c_ulonglong,
181        pub signal: c_longlong,
182        __reserved: Padding<c_int>,
183        #[cfg(target_pointer_width = "32")]
184        __pad1: Padding<u32>,
185        pub u_ar0: *mut user_regs_struct,
186        #[cfg(target_pointer_width = "32")]
187        __pad2: Padding<u32>,
188        pub u_fpstate: *mut user_fpregs_struct,
189        pub magic: c_ulonglong,
190        pub u_comm: [c_char; 32],
191        pub u_debugreg: [c_ulonglong; 8],
192    }
193
194    pub struct mcontext_t {
195        pub gregs: [greg_t; 23],
196        pub fpregs: *mut _libc_fpstate,
197        __private: [u64; 8],
198    }
199
200    pub struct ipc_perm {
201        pub __key: crate::key_t,
202        pub uid: crate::uid_t,
203        pub gid: crate::gid_t,
204        pub cuid: crate::uid_t,
205        pub cgid: crate::gid_t,
206        pub mode: c_ushort,
207        __pad1: Padding<c_ushort>,
208        pub __seq: c_ushort,
209        __pad2: Padding<c_ushort>,
210        __unused1: Padding<u64>,
211        __unused2: Padding<u64>,
212    }
213
214    pub struct shmid_ds {
215        pub shm_perm: crate::ipc_perm,
216        pub shm_segsz: size_t,
217        pub shm_atime: crate::time_t,
218        pub shm_dtime: crate::time_t,
219        pub shm_ctime: crate::time_t,
220        pub shm_cpid: crate::pid_t,
221        pub shm_lpid: crate::pid_t,
222        pub shm_nattch: crate::shmatt_t,
223        __unused4: Padding<u64>,
224        __unused5: Padding<u64>,
225    }
226
227    pub struct ptrace_rseq_configuration {
228        pub rseq_abi_pointer: crate::__u64,
229        pub rseq_abi_size: crate::__u32,
230        pub signature: crate::__u32,
231        pub flags: crate::__u32,
232        pub pad: crate::__u32,
233    }
234
235    #[repr(align(8))]
236    pub struct clone_args {
237        pub flags: c_ulonglong,
238        pub pidfd: c_ulonglong,
239        pub child_tid: c_ulonglong,
240        pub parent_tid: c_ulonglong,
241        pub exit_signal: c_ulonglong,
242        pub stack: c_ulonglong,
243        pub stack_size: c_ulonglong,
244        pub tls: c_ulonglong,
245        pub set_tid: c_ulonglong,
246        pub set_tid_size: c_ulonglong,
247        pub cgroup: c_ulonglong,
248    }
249
250    pub struct user_fpregs_struct {
251        pub cwd: c_ushort,
252        pub swd: c_ushort,
253        pub ftw: c_ushort,
254        pub fop: c_ushort,
255        pub rip: c_ulonglong,
256        pub rdp: c_ulonglong,
257        pub mxcsr: c_uint,
258        pub mxcr_mask: c_uint,
259        pub st_space: [c_uint; 32],
260        pub xmm_space: [c_uint; 64],
261        padding: Padding<[c_uint; 24]>,
262    }
263
264    pub struct ucontext_t {
265        pub uc_flags: c_ulong,
266        pub uc_link: *mut ucontext_t,
267        pub uc_stack: crate::stack_t,
268        pub uc_mcontext: mcontext_t,
269        pub uc_sigmask: crate::sigset_t,
270        __private: [u8; 512],
271        __ssp: [c_ulonglong; 4],
272    }
273}
274
275#[repr(C)]
#[repr(align(16))]
pub struct max_align_t {
    priv_: [f64; 4],
}
#[automatically_derived]
#[doc(hidden)]
unsafe impl ::core::clone::TrivialClone for max_align_t { }
#[automatically_derived]
impl ::core::clone::Clone for max_align_t {
    #[inline]
    fn clone(&self) -> Self {
        let _: ::core::clone::AssertParamIsClone<[f64; 4]>;
        *self
    }
}
#[automatically_derived]
impl ::core::marker::Copy for max_align_t { }
#[automatically_derived]
impl ::core::fmt::Debug for max_align_t {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f, "max_align_t",
            "priv_", &&self.priv_)
    }
}s_no_extra_traits! {
276    #[repr(align(16))]
277    pub struct max_align_t {
278        priv_: [f64; 4],
279    }
280}
281
282pub const POSIX_FADV_DONTNEED: c_int = 4;
283pub const POSIX_FADV_NOREUSE: c_int = 5;
284
285pub const VEOF: usize = 4;
286pub const RTLD_DEEPBIND: c_int = 0x8;
287pub const RTLD_GLOBAL: c_int = 0x100;
288pub const RTLD_NOLOAD: c_int = 0x4;
289
290pub const O_APPEND: c_int = 1024;
291pub const O_CREAT: c_int = 64;
292pub const O_EXCL: c_int = 128;
293pub const O_NOCTTY: c_int = 256;
294pub const O_NONBLOCK: c_int = 2048;
295pub const O_SYNC: c_int = 1052672;
296pub const O_RSYNC: c_int = 1052672;
297pub const O_DSYNC: c_int = 4096;
298pub const O_FSYNC: c_int = 0x101000;
299pub const O_NOATIME: c_int = 0o1000000;
300pub const O_PATH: c_int = 0o10000000;
301pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY;
302
303pub const MADV_SOFT_OFFLINE: c_int = 101;
304pub const MAP_GROWSDOWN: c_int = 0x0100;
305
306pub const EDEADLK: c_int = 35;
307pub const ENAMETOOLONG: c_int = 36;
308pub const ENOLCK: c_int = 37;
309pub const ENOSYS: c_int = 38;
310pub const ENOTEMPTY: c_int = 39;
311pub const ELOOP: c_int = 40;
312pub const ENOMSG: c_int = 42;
313pub const EIDRM: c_int = 43;
314pub const ECHRNG: c_int = 44;
315pub const EL2NSYNC: c_int = 45;
316pub const EL3HLT: c_int = 46;
317pub const EL3RST: c_int = 47;
318pub const ELNRNG: c_int = 48;
319pub const EUNATCH: c_int = 49;
320pub const ENOCSI: c_int = 50;
321pub const EL2HLT: c_int = 51;
322pub const EBADE: c_int = 52;
323pub const EBADR: c_int = 53;
324pub const EXFULL: c_int = 54;
325pub const ENOANO: c_int = 55;
326pub const EBADRQC: c_int = 56;
327pub const EBADSLT: c_int = 57;
328pub const EMULTIHOP: c_int = 72;
329pub const EOVERFLOW: c_int = 75;
330pub const ENOTUNIQ: c_int = 76;
331pub const EBADFD: c_int = 77;
332pub const EBADMSG: c_int = 74;
333pub const EREMCHG: c_int = 78;
334pub const ELIBACC: c_int = 79;
335pub const ELIBBAD: c_int = 80;
336pub const ELIBSCN: c_int = 81;
337pub const ELIBMAX: c_int = 82;
338pub const ELIBEXEC: c_int = 83;
339pub const EILSEQ: c_int = 84;
340pub const ERESTART: c_int = 85;
341pub const ESTRPIPE: c_int = 86;
342pub const EUSERS: c_int = 87;
343pub const ENOTSOCK: c_int = 88;
344pub const EDESTADDRREQ: c_int = 89;
345pub const EMSGSIZE: c_int = 90;
346pub const EPROTOTYPE: c_int = 91;
347pub const ENOPROTOOPT: c_int = 92;
348pub const EPROTONOSUPPORT: c_int = 93;
349pub const ESOCKTNOSUPPORT: c_int = 94;
350pub const EOPNOTSUPP: c_int = 95;
351pub const EPFNOSUPPORT: c_int = 96;
352pub const EAFNOSUPPORT: c_int = 97;
353pub const EADDRINUSE: c_int = 98;
354pub const EADDRNOTAVAIL: c_int = 99;
355pub const ENETDOWN: c_int = 100;
356pub const ENETUNREACH: c_int = 101;
357pub const ENETRESET: c_int = 102;
358pub const ECONNABORTED: c_int = 103;
359pub const ECONNRESET: c_int = 104;
360pub const ENOBUFS: c_int = 105;
361pub const EISCONN: c_int = 106;
362pub const ENOTCONN: c_int = 107;
363pub const ESHUTDOWN: c_int = 108;
364pub const ETOOMANYREFS: c_int = 109;
365pub const ETIMEDOUT: c_int = 110;
366pub const ECONNREFUSED: c_int = 111;
367pub const EHOSTDOWN: c_int = 112;
368pub const EHOSTUNREACH: c_int = 113;
369pub const EALREADY: c_int = 114;
370pub const EINPROGRESS: c_int = 115;
371pub const ESTALE: c_int = 116;
372pub const EDQUOT: c_int = 122;
373pub const ENOMEDIUM: c_int = 123;
374pub const EMEDIUMTYPE: c_int = 124;
375pub const ECANCELED: c_int = 125;
376pub const ENOKEY: c_int = 126;
377pub const EKEYEXPIRED: c_int = 127;
378pub const EKEYREVOKED: c_int = 128;
379pub const EKEYREJECTED: c_int = 129;
380pub const EOWNERDEAD: c_int = 130;
381pub const ENOTRECOVERABLE: c_int = 131;
382pub const EHWPOISON: c_int = 133;
383pub const ERFKILL: c_int = 132;
384
385pub const POLLWRNORM: c_short = 0x100;
386pub const POLLWRBAND: c_short = 0x200;
387
388pub const O_ASYNC: c_int = 0x2000;
389pub const O_NDELAY: c_int = 0x800;
390
391pub const PTRACE_DETACH: c_uint = 17;
392pub const PTRACE_GET_RSEQ_CONFIGURATION: c_uint = 0x420f;
393
394pub const EFD_NONBLOCK: c_int = 0x800;
395
396pub const F_GETLK: c_int = 5;
397pub const F_GETOWN: c_int = 9;
398pub const F_SETOWN: c_int = 8;
399pub const F_SETLK: c_int = 6;
400pub const F_SETLKW: c_int = 7;
401pub const F_OFD_GETLK: c_int = 36;
402pub const F_OFD_SETLK: c_int = 37;
403pub const F_OFD_SETLKW: c_int = 38;
404
405pub const F_RDLCK: c_int = 0;
406pub const F_WRLCK: c_int = 1;
407pub const F_UNLCK: c_int = 2;
408
409pub const SFD_NONBLOCK: c_int = 0x0800;
410
411pub const TCSANOW: c_int = 0;
412pub const TCSADRAIN: c_int = 1;
413pub const TCSAFLUSH: c_int = 2;
414
415pub const SFD_CLOEXEC: c_int = 0x080000;
416
417pub const NCCS: usize = 32;
418
419pub const O_TRUNC: c_int = 512;
420
421pub const O_CLOEXEC: c_int = 0x80000;
422
423pub const EBFONT: c_int = 59;
424pub const ENOSTR: c_int = 60;
425pub const ENODATA: c_int = 61;
426pub const ETIME: c_int = 62;
427pub const ENOSR: c_int = 63;
428pub const ENONET: c_int = 64;
429pub const ENOPKG: c_int = 65;
430pub const EREMOTE: c_int = 66;
431pub const ENOLINK: c_int = 67;
432pub const EADV: c_int = 68;
433pub const ESRMNT: c_int = 69;
434pub const ECOMM: c_int = 70;
435pub const EPROTO: c_int = 71;
436pub const EDOTDOT: c_int = 73;
437
438pub const EPOLL_CLOEXEC: c_int = 0x80000;
439
440pub const EFD_CLOEXEC: c_int = 0x80000;
441
442pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
443pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
444pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
445
446pub const O_DIRECT: c_int = 0x4000;
447pub const O_DIRECTORY: c_int = 0x10000;
448pub const O_NOFOLLOW: c_int = 0x20000;
449
450pub const MAP_HUGETLB: c_int = 0x040000;
451pub const MAP_LOCKED: c_int = 0x02000;
452pub const MAP_NORESERVE: c_int = 0x04000;
453pub const MAP_32BIT: c_int = 0x0040;
454pub const MAP_ANON: c_int = 0x0020;
455pub const MAP_ANONYMOUS: c_int = 0x0020;
456pub const MAP_DENYWRITE: c_int = 0x0800;
457pub const MAP_EXECUTABLE: c_int = 0x01000;
458pub const MAP_POPULATE: c_int = 0x08000;
459pub const MAP_NONBLOCK: c_int = 0x010000;
460pub const MAP_STACK: c_int = 0x020000;
461pub const MAP_SYNC: c_int = 0x080000;
462
463pub const EDEADLOCK: c_int = 35;
464pub const EUCLEAN: c_int = 117;
465pub const ENOTNAM: c_int = 118;
466pub const ENAVAIL: c_int = 119;
467pub const EISNAM: c_int = 120;
468pub const EREMOTEIO: c_int = 121;
469
470pub const PTRACE_GETFPREGS: c_uint = 14;
471pub const PTRACE_SETFPREGS: c_uint = 15;
472pub const PTRACE_GETFPXREGS: c_uint = 18;
473pub const PTRACE_SETFPXREGS: c_uint = 19;
474pub const PTRACE_GETREGS: c_uint = 12;
475pub const PTRACE_SETREGS: c_uint = 13;
476pub const PTRACE_PEEKSIGINFO_SHARED: c_uint = 1;
477pub const PTRACE_SYSEMU: c_uint = 31;
478pub const PTRACE_SYSEMU_SINGLESTEP: c_uint = 32;
479
480pub const PR_GET_SPECULATION_CTRL: c_int = 52;
481pub const PR_SET_SPECULATION_CTRL: c_int = 53;
482pub const PR_SPEC_NOT_AFFECTED: c_uint = 0;
483pub const PR_SPEC_PRCTL: c_uint = 1 << 0;
484pub const PR_SPEC_ENABLE: c_uint = 1 << 1;
485pub const PR_SPEC_DISABLE: c_uint = 1 << 2;
486pub const PR_SPEC_FORCE_DISABLE: c_uint = 1 << 3;
487pub const PR_SPEC_DISABLE_NOEXEC: c_uint = 1 << 4;
488pub const PR_SPEC_STORE_BYPASS: c_int = 0;
489pub const PR_SPEC_INDIRECT_BRANCH: c_int = 1;
490// FIXME(linux): perharps for later
491//pub const PR_SPEC_L1D_FLUSH: c_int = 2;
492
493pub const MCL_CURRENT: c_int = 0x0001;
494pub const MCL_FUTURE: c_int = 0x0002;
495pub const MCL_ONFAULT: c_int = 0x0004;
496
497pub const SIGSTKSZ: size_t = 8192;
498pub const MINSIGSTKSZ: size_t = 2048;
499pub const CBAUD: crate::tcflag_t = 0o0010017;
500pub const TAB1: crate::tcflag_t = 0x00000800;
501pub const TAB2: crate::tcflag_t = 0x00001000;
502pub const TAB3: crate::tcflag_t = 0x00001800;
503pub const CR1: crate::tcflag_t = 0x00000200;
504pub const CR2: crate::tcflag_t = 0x00000400;
505pub const CR3: crate::tcflag_t = 0x00000600;
506pub const FF1: crate::tcflag_t = 0x00008000;
507pub const BS1: crate::tcflag_t = 0x00002000;
508pub const VT1: crate::tcflag_t = 0x00004000;
509pub const VWERASE: usize = 14;
510pub const VREPRINT: usize = 12;
511pub const VSUSP: usize = 10;
512pub const VSTART: usize = 8;
513pub const VSTOP: usize = 9;
514pub const VDISCARD: usize = 13;
515pub const VTIME: usize = 5;
516pub const IXON: crate::tcflag_t = 0x00000400;
517pub const IXOFF: crate::tcflag_t = 0x00001000;
518pub const ONLCR: crate::tcflag_t = 0x4;
519pub const CSIZE: crate::tcflag_t = 0x00000030;
520pub const CS6: crate::tcflag_t = 0x00000010;
521pub const CS7: crate::tcflag_t = 0x00000020;
522pub const CS8: crate::tcflag_t = 0x00000030;
523pub const CSTOPB: crate::tcflag_t = 0x00000040;
524pub const CREAD: crate::tcflag_t = 0x00000080;
525pub const PARENB: crate::tcflag_t = 0x00000100;
526pub const PARODD: crate::tcflag_t = 0x00000200;
527pub const HUPCL: crate::tcflag_t = 0x00000400;
528pub const CLOCAL: crate::tcflag_t = 0x00000800;
529pub const ECHOKE: crate::tcflag_t = 0x00000800;
530pub const ECHOE: crate::tcflag_t = 0x00000010;
531pub const ECHOK: crate::tcflag_t = 0x00000020;
532pub const ECHONL: crate::tcflag_t = 0x00000040;
533pub const ECHOPRT: crate::tcflag_t = 0x00000400;
534pub const ECHOCTL: crate::tcflag_t = 0x00000200;
535pub const ISIG: crate::tcflag_t = 0x00000001;
536pub const ICANON: crate::tcflag_t = 0x00000002;
537pub const PENDIN: crate::tcflag_t = 0x00004000;
538pub const NOFLSH: crate::tcflag_t = 0x00000080;
539pub const CIBAUD: crate::tcflag_t = 0o02003600000;
540pub const CBAUDEX: crate::tcflag_t = 0o010000;
541pub const VSWTC: usize = 7;
542pub const OLCUC: crate::tcflag_t = 0o000002;
543pub const NLDLY: crate::tcflag_t = 0o000400;
544pub const CRDLY: crate::tcflag_t = 0o003000;
545pub const TABDLY: crate::tcflag_t = 0o014000;
546pub const BSDLY: crate::tcflag_t = 0o020000;
547pub const FFDLY: crate::tcflag_t = 0o100000;
548pub const VTDLY: crate::tcflag_t = 0o040000;
549pub const XTABS: crate::tcflag_t = 0o014000;
550
551pub const B0: crate::speed_t = 0o000000;
552pub const B50: crate::speed_t = 0o000001;
553pub const B75: crate::speed_t = 0o000002;
554pub const B110: crate::speed_t = 0o000003;
555pub const B134: crate::speed_t = 0o000004;
556pub const B150: crate::speed_t = 0o000005;
557pub const B200: crate::speed_t = 0o000006;
558pub const B300: crate::speed_t = 0o000007;
559pub const B600: crate::speed_t = 0o000010;
560pub const B1200: crate::speed_t = 0o000011;
561pub const B1800: crate::speed_t = 0o000012;
562pub const B2400: crate::speed_t = 0o000013;
563pub const B4800: crate::speed_t = 0o000014;
564pub const B9600: crate::speed_t = 0o000015;
565pub const B19200: crate::speed_t = 0o000016;
566pub const B38400: crate::speed_t = 0o000017;
567pub const EXTA: crate::speed_t = B19200;
568pub const EXTB: crate::speed_t = B38400;
569pub const B57600: crate::speed_t = 0o010001;
570pub const B115200: crate::speed_t = 0o010002;
571pub const B230400: crate::speed_t = 0o010003;
572pub const B460800: crate::speed_t = 0o010004;
573pub const B500000: crate::speed_t = 0o010005;
574pub const B576000: crate::speed_t = 0o010006;
575pub const B921600: crate::speed_t = 0o010007;
576pub const B1000000: crate::speed_t = 0o010010;
577pub const B1152000: crate::speed_t = 0o010011;
578pub const B1500000: crate::speed_t = 0o010012;
579pub const B2000000: crate::speed_t = 0o010013;
580pub const B2500000: crate::speed_t = 0o010014;
581pub const B3000000: crate::speed_t = 0o010015;
582pub const B3500000: crate::speed_t = 0o010016;
583pub const B4000000: crate::speed_t = 0o010017;
584
585pub const VEOL: usize = 11;
586pub const VEOL2: usize = 16;
587pub const VMIN: usize = 6;
588pub const IEXTEN: crate::tcflag_t = 0x00008000;
589pub const TOSTOP: crate::tcflag_t = 0x00000100;
590pub const FLUSHO: crate::tcflag_t = 0x00001000;
591pub const EXTPROC: crate::tcflag_t = 0x00010000;
592
593// offsets in user_regs_structs, from sys/reg.h
594pub const R15: c_int = 0;
595pub const R14: c_int = 1;
596pub const R13: c_int = 2;
597pub const R12: c_int = 3;
598pub const RBP: c_int = 4;
599pub const RBX: c_int = 5;
600pub const R11: c_int = 6;
601pub const R10: c_int = 7;
602pub const R9: c_int = 8;
603pub const R8: c_int = 9;
604pub const RAX: c_int = 10;
605pub const RCX: c_int = 11;
606pub const RDX: c_int = 12;
607pub const RSI: c_int = 13;
608pub const RDI: c_int = 14;
609pub const ORIG_RAX: c_int = 15;
610pub const RIP: c_int = 16;
611pub const CS: c_int = 17;
612pub const EFLAGS: c_int = 18;
613pub const RSP: c_int = 19;
614pub const SS: c_int = 20;
615pub const FS_BASE: c_int = 21;
616pub const GS_BASE: c_int = 22;
617pub const DS: c_int = 23;
618pub const ES: c_int = 24;
619pub const FS: c_int = 25;
620pub const GS: c_int = 26;
621
622// offsets in mcontext_t.gregs from sys/ucontext.h
623pub const REG_R8: c_int = 0;
624pub const REG_R9: c_int = 1;
625pub const REG_R10: c_int = 2;
626pub const REG_R11: c_int = 3;
627pub const REG_R12: c_int = 4;
628pub const REG_R13: c_int = 5;
629pub const REG_R14: c_int = 6;
630pub const REG_R15: c_int = 7;
631pub const REG_RDI: c_int = 8;
632pub const REG_RSI: c_int = 9;
633pub const REG_RBP: c_int = 10;
634pub const REG_RBX: c_int = 11;
635pub const REG_RDX: c_int = 12;
636pub const REG_RAX: c_int = 13;
637pub const REG_RCX: c_int = 14;
638pub const REG_RSP: c_int = 15;
639pub const REG_RIP: c_int = 16;
640pub const REG_EFL: c_int = 17;
641pub const REG_CSGSFS: c_int = 18;
642pub const REG_ERR: c_int = 19;
643pub const REG_TRAPNO: c_int = 20;
644pub const REG_OLDMASK: c_int = 21;
645pub const REG_CR2: c_int = 22;
646
647extern "C" {
648    pub fn getcontext(ucp: *mut ucontext_t) -> c_int;
649    pub fn setcontext(ucp: *const ucontext_t) -> c_int;
650    pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: c_int, ...);
651    pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> c_int;
652}
653
654cfg_if! {
655    if #[cfg(target_pointer_width = "32")] {
656        mod x32;
657        pub use self::x32::*;
658    } else {
659        mod not_x32;
660        pub use self::not_x32::*;
661    }
662}