Debian Codegraph @

.cargo/vendor/libc/src/unix/linux_like/linux/musl/b64/mod.rs

raw
1 pub type c_long = i64;
2 pub type c_ulong = u64;
3 pub type regoff_t = ::c_long;
4
5 s! {
6 pub struct statfs64 {
7 pub f_type: ::c_ulong,
8 pub f_bsize: ::c_ulong,
9 pub f_blocks: ::fsblkcnt_t,
10 pub f_bfree: ::fsblkcnt_t,
11 pub f_bavail: ::fsblkcnt_t,
12 pub f_files: ::fsfilcnt_t,
13 pub f_ffree: ::fsfilcnt_t,
14 pub f_fsid: ::fsid_t,
15 pub f_namelen: ::c_ulong,
16 pub f_frsize: ::c_ulong,
17 pub f_flags: ::c_ulong,
18 pub f_spare: [::c_ulong; 4],
19 }
20
21 pub struct statvfs64 {
22 pub f_bsize: ::c_ulong,
23 pub f_frsize: ::c_ulong,
24 pub f_blocks: u64,
25 pub f_bfree: u64,
26 pub f_bavail: u64,
27 pub f_files: u64,
28 pub f_ffree: u64,
29 pub f_favail: u64,
30 pub f_fsid: ::c_ulong,
31 pub f_flag: ::c_ulong,
32 pub f_namemax: ::c_ulong,
33 __f_spare: [::c_int; 6],
34 }
35
36 pub struct stack_t {
37 pub ss_sp: *mut ::c_void,
38 pub ss_flags: ::c_int,
39 pub ss_size: ::size_t
40 }
41
42 pub struct pthread_attr_t {
43 __size: [u64; 7]
44 }
45
46 pub struct sigset_t {
47 __val: [::c_ulong; 16],
48 }
49
50 pub struct shmid_ds {
51 pub shm_perm: ::ipc_perm,
52 pub shm_segsz: ::size_t,
53 pub shm_atime: ::time_t,
54 pub shm_dtime: ::time_t,
55 pub shm_ctime: ::time_t,
56 pub shm_cpid: ::pid_t,
57 pub shm_lpid: ::pid_t,
58 pub shm_nattch: ::c_ulong,
59 __pad1: ::c_ulong,
60 __pad2: ::c_ulong,
61 }
62
63 pub struct msqid_ds {
64 pub msg_perm: ::ipc_perm,
65 pub msg_stime: ::time_t,
66 pub msg_rtime: ::time_t,
67 pub msg_ctime: ::time_t,
68 __msg_cbytes: ::c_ulong,
69 pub msg_qnum: ::msgqnum_t,
70 pub msg_qbytes: ::msglen_t,
71 pub msg_lspid: ::pid_t,
72 pub msg_lrpid: ::pid_t,
73 __pad1: ::c_ulong,
74 __pad2: ::c_ulong,
75 }
76
77 pub struct statfs {
78 pub f_type: ::c_ulong,
79 pub f_bsize: ::c_ulong,
80 pub f_blocks: ::fsblkcnt_t,
81 pub f_bfree: ::fsblkcnt_t,
82 pub f_bavail: ::fsblkcnt_t,
83 pub f_files: ::fsfilcnt_t,
84 pub f_ffree: ::fsfilcnt_t,
85 pub f_fsid: ::fsid_t,
86 pub f_namelen: ::c_ulong,
87 pub f_frsize: ::c_ulong,
88 pub f_flags: ::c_ulong,
89 pub f_spare: [::c_ulong; 4],
90 }
91
92 pub struct msghdr {
93 pub msg_name: *mut ::c_void,
94 pub msg_namelen: ::socklen_t,
95 pub msg_iov: *mut ::iovec,
96 #[cfg(target_endian = "big")]
97 __pad1: ::c_int,
98 pub msg_iovlen: ::c_int,
99 #[cfg(target_endian = "little")]
100 __pad1: ::c_int,
101 pub msg_control: *mut ::c_void,
102 #[cfg(target_endian = "big")]
103 __pad2: ::c_int,
104 pub msg_controllen: ::socklen_t,
105 #[cfg(target_endian = "little")]
106 __pad2: ::c_int,
107 pub msg_flags: ::c_int,
108 }
109
110 pub struct cmsghdr {
111 #[cfg(target_endian = "big")]
112 pub __pad1: ::c_int,
113 pub cmsg_len: ::socklen_t,
114 #[cfg(target_endian = "little")]
115 pub __pad1: ::c_int,
116 pub cmsg_level: ::c_int,
117 pub cmsg_type: ::c_int,
118 }
119
120 pub struct sem_t {
121 __val: [::c_int; 8],
122 }
123
124 pub struct siginfo_t {
125 pub si_signo: ::c_int,
126 pub si_errno: ::c_int,
127 pub si_code: ::c_int,
128 pub _pad: [::c_int; 29],
129 _align: [usize; 0],
130 }
131 }
132
133 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
134 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
135 pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32;
136
137 extern "C" {
138 pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
139 }
140
141 cfg_if! {
142 if #[cfg(target_arch = "aarch64")] {
143 mod aarch64;
144 pub use self::aarch64::*;
145 } else if #[cfg(target_arch = "mips64")] {
146 mod mips64;
147 pub use self::mips64::*;
148 } else if #[cfg(any(target_arch = "powerpc64"))] {
149 mod powerpc64;
150 pub use self::powerpc64::*;
151 } else if #[cfg(any(target_arch = "s390x"))] {
152 mod s390x;
153 pub use self::s390x::*;
154 } else if #[cfg(any(target_arch = "x86_64"))] {
155 mod x86_64;
156 pub use self::x86_64::*;
157 } else if #[cfg(any(target_arch = "riscv64"))] {
158 mod riscv64;
159 pub use self::riscv64::*;
160 } else if #[cfg(any(target_arch = "loongarch64"))] {
161 mod loongarch64;
162 pub use self::loongarch64::*;
163 } else {
164 // Unknown target_arch
165 }
166 }