]> git.proxmox.com Git - rustc.git/blob - vendor/libc/src/unix/bsd/netbsdlike/netbsd/x86_64.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / vendor / libc / src / unix / bsd / netbsdlike / netbsd / x86_64.rs
1 use PT_FIRSTMACH;
2
3 pub type c_long = i64;
4 pub type c_ulong = u64;
5 pub type c_char = i8;
6 pub type c___greg_t = u64;
7 pub type __cpu_simple_lock_nv_t = ::c_uchar;
8
9 s! {
10 pub struct mcontext_t {
11 pub __gregs: [c___greg_t; 26],
12 pub _mc_tlsbase: c___greg_t,
13 pub __fpregs: [[::c_char;32]; 16],
14 }
15
16 pub struct ucontext_t {
17 pub uc_flags: ::c_uint,
18 pub uc_link: *mut ::ucontext_t,
19 pub uc_sigmask: ::sigset_t,
20 pub uc_stack: ::stack_t,
21 pub uc_mcontext: ::mcontext_t,
22 }
23 }
24
25 // should be pub(crate), but that requires Rust 1.18.0
26 cfg_if! {
27 if #[cfg(libc_const_size_of)] {
28 #[doc(hidden)]
29 pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1;
30 } else {
31 #[doc(hidden)]
32 pub const _ALIGNBYTES: usize = 8 - 1;
33 }
34 }
35
36 pub const PT_STEP: ::c_int = PT_FIRSTMACH + 0;
37 pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1;
38 pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 2;
39 pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 3;
40 pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4;