aboutsummaryrefslogtreecommitdiff
path: root/libc/src/unix/notbsd/linux/mips/mips32.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/unix/notbsd/linux/mips/mips32.rs')
-rw-r--r--libc/src/unix/notbsd/linux/mips/mips32.rs97
1 files changed, 43 insertions, 54 deletions
diff --git a/libc/src/unix/notbsd/linux/mips/mips32.rs b/libc/src/unix/notbsd/linux/mips/mips32.rs
index 042495e..0bfcc4f 100644
--- a/libc/src/unix/notbsd/linux/mips/mips32.rs
+++ b/libc/src/unix/notbsd/linux/mips/mips32.rs
@@ -10,9 +10,7 @@ pub type ino_t = u32;
pub type blkcnt_t = i32;
pub type blksize_t = i32;
pub type nlink_t = u32;
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type rlim_t = c_ulong;
+pub type __u64 = ::c_ulonglong;
s! {
pub struct aiocb {
@@ -78,6 +76,40 @@ s! {
st_pad5: [::c_long; 14],
}
+ pub struct statfs64 {
+ pub f_type: ::c_long,
+ pub f_bsize: ::c_long,
+ pub f_frsize: ::c_long,
+ pub f_blocks: u64,
+ pub f_bfree: u64,
+ pub f_files: u64,
+ pub f_ffree: u64,
+ pub f_bavail: u64,
+ pub f_fsid: ::fsid_t,
+ pub f_namelen: ::c_long,
+ pub f_flags: ::c_long,
+ pub f_spare: [::c_long; 5],
+ }
+
+ pub struct statvfs64 {
+ pub f_bsize: ::c_ulong,
+ pub f_frsize: ::c_ulong,
+ pub f_blocks: u64,
+ pub f_bfree: u64,
+ pub f_bavail: u64,
+ pub f_files: u64,
+ pub f_ffree: u64,
+ pub f_favail: u64,
+ #[cfg(target_endian = "little")]
+ pub f_fsid: ::c_ulong,
+ __f_unused: ::c_int,
+ #[cfg(target_endian = "big")]
+ pub f_fsid: ::c_ulong,
+ pub f_flag: ::c_ulong,
+ pub f_namemax: ::c_ulong,
+ __f_spare: [::c_int; 6],
+ }
+
pub struct pthread_attr_t {
__size: [u32; 9]
}
@@ -107,19 +139,6 @@ s! {
pub _pad: [::c_int; 29],
}
- pub struct glob64_t {
- pub gl_pathc: ::size_t,
- pub gl_pathv: *mut *mut ::c_char,
- pub gl_offs: ::size_t,
- pub gl_flags: ::c_int,
-
- __unused1: *mut ::c_void,
- __unused2: *mut ::c_void,
- __unused3: *mut ::c_void,
- __unused4: *mut ::c_void,
- __unused5: *mut ::c_void,
- }
-
pub struct ipc_perm {
pub __key: ::key_t,
pub uid: ::uid_t,
@@ -238,50 +257,20 @@ s! {
pub mem_unit: ::c_uint,
pub _f: [::c_char; 8],
}
-
- // FIXME this is actually a union
- pub struct sem_t {
- #[cfg(target_pointer_width = "32")]
- __size: [::c_char; 16],
- #[cfg(target_pointer_width = "64")]
- __size: [::c_char; 32],
- __align: [::c_long; 0],
- }
}
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
-pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
+pub const O_LARGEFILE: ::c_int = 0x2000;
-pub const SYS_gettid: ::c_long = 4222; // Valid for O32
+pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
-#[link(name = "util")]
-extern {
- pub fn sysctl(name: *mut ::c_int,
- namelen: ::c_int,
- oldp: *mut ::c_void,
- oldlenp: *mut ::size_t,
- newp: *mut ::c_void,
- newlen: ::size_t)
- -> ::c_int;
- pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
- pub fn backtrace(buf: *mut *mut ::c_void,
- sz: ::c_int) -> ::c_int;
- pub fn glob64(pattern: *const ::c_char,
- flags: ::c_int,
- errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
- errno: ::c_int)
- -> ::c_int>,
- pglob: *mut glob64_t) -> ::c_int;
- pub fn globfree64(pglob: *mut glob64_t);
- pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
- pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
- cpusetsize: ::size_t,
- cpuset: *mut ::cpu_set_t) -> ::c_int;
- pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
- cpusetsize: ::size_t,
- cpuset: *const ::cpu_set_t) -> ::c_int;
-}
+// Valid for O32
+pub const SYS_pivot_root: ::c_long = 4216;
+pub const SYS_gettid: ::c_long = 4222;
+pub const SYS_perf_event_open: ::c_long = 4333;
+pub const SYS_memfd_create: ::c_long = 4354;