Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/libc/src/fuchsia/x86_64.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / libc / src / fuchsia / x86_64.rs` 110 lines ยท 3043 bytes Raw Blame History 1 use crate::off_t; 2 use crate::prelude::*; 3 4 pub type wchar_t = i32; 5 pub type nlink_t = u64; 6 pub type blksize_t = c_long; 7 pub type __u64 = c_ulonglong; 8 9 s! { 10 pub struct stat { 11 pub st_dev: crate::dev_t, 12 pub st_ino: crate::ino_t, 13 pub st_nlink: crate::nlink_t, 14 pub st_mode: crate::mode_t, 15 pub st_uid: crate::uid_t, 16 pub st_gid: crate::gid_t, 17 __pad0: Padding, 18 pub st_rdev: crate::dev_t, 19 pub st_size: off_t, 20 pub st_blksize: crate::blksize_t, 21 pub st_blocks: crate::blkcnt_t, 22 pub st_atime: crate::time_t, 23 pub st_atime_nsec: c_long, 24 pub st_mtime: crate::time_t, 25 pub st_mtime_nsec: c_long, 26 pub st_ctime: crate::time_t, 27 pub st_ctime_nsec: c_long, 28 __unused: Padding<[c_long; 3]>, 29 } 30 31 pub struct stat64 { 32 pub st_dev: crate::dev_t, 33 pub st_ino: crate::ino64_t, 34 pub st_nlink: crate::nlink_t, 35 pub st_mode: crate::mode_t, 36 pub st_uid: crate::uid_t, 37 pub st_gid: crate::gid_t, 38 __pad0: Padding, 39 pub st_rdev: crate::dev_t, 40 pub st_size: off_t, 41 pub st_blksize: crate::blksize_t, 42 pub st_blocks: crate::blkcnt64_t, 43 pub st_atime: crate::time_t, 44 pub st_atime_nsec: c_long, 45 pub st_mtime: crate::time_t, 46 pub st_mtime_nsec: c_long, 47 pub st_ctime: crate::time_t, 48 pub st_ctime_nsec: c_long, 49 __reserved: Padding<[c_long; 3]>, 50 } 51 52 pub struct mcontext_t { 53 __private: [u64; 32], 54 } 55 56 pub struct ipc_perm { 57 pub __ipc_perm_key: crate::key_t, 58 pub uid: crate::uid_t, 59 pub gid: crate::gid_t, 60 pub cuid: crate::uid_t, 61 pub cgid: crate::gid_t, 62 pub mode: crate::mode_t, 63 pub __seq: c_int, 64 __unused1: Padding, 65 __unused2: Padding, 66 } 67 68 pub struct ucontext_t { 69 pub uc_flags: c_ulong, 70 pub uc_link: *mut ucontext_t, 71 pub uc_stack: crate::stack_t, 72 pub uc_mcontext: mcontext_t, 73 pub uc_sigmask: crate::sigset_t, 74 __private: [u8; 512], 75 } 76 } 77 78 // offsets in user_regs_structs, from sys/reg.h 79 pub const R15: c_int = 0; 80 pub const R14: c_int = 1; 81 pub const R13: c_int = 2; 82 pub const R12: c_int = 3; 83 pub const RBP: c_int = 4; 84 pub const RBX: c_int = 5; 85 pub const R11: c_int = 6; 86 pub const R10: c_int = 7; 87 pub const R9: c_int = 8; 88 pub const R8: c_int = 9; 89 pub const RAX: c_int = 10; 90 pub const RCX: c_int = 11; 91 pub const RDX: c_int = 12; 92 pub const RSI: c_int = 13; 93 pub const RDI: c_int = 14; 94 pub const ORIG_RAX: c_int = 15; 95 pub const RIP: c_int = 16; 96 pub const CS: c_int = 17; 97 pub const EFLAGS: c_int = 18; 98 pub const RSP: c_int = 19; 99 pub const SS: c_int = 20; 100 pub const FS_BASE: c_int = 21; 101 pub const GS_BASE: c_int = 22; 102 pub const DS: c_int = 23; 103 pub const ES: c_int = 24; 104 pub const FS: c_int = 25; 105 pub const GS: c_int = 26; 106 107 pub const MAP_32BIT: c_int = 0x0040; 108 109 pub const SIGSTKSZ: size_t = 8192; 110 pub const MINSIGSTKSZ: size_t = 2048;