Add align feature to pthread structs
This commit is contained in:
parent
41ca29f709
commit
2819634696
|
@ -520,14 +520,30 @@ s! {
|
|||
pub ifa_data: *mut ::c_void
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutex_t {
|
||||
#[cfg(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32")))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32"))))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
|
@ -536,14 +552,30 @@ s! {
|
|||
size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_rwlock_t {
|
||||
#[cfg(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32")))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32"))))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
|
@ -552,39 +584,78 @@ s! {
|
|||
size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl"))),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutexattr_t {
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
#[cfg(all(not(features = "align"),
|
||||
any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64", target_arch = "aarch64")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(all(target_arch = "aarch64", target_env = "gnu"))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(all(target_arch = "aarch64", target_env = "musl"))]
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl"))))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(all(not(features = "align"),
|
||||
not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl")))))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_env = "musl", target_pointer_width = "32")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(target_env = "musl"),
|
||||
target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_rwlockattr_t {
|
||||
#[cfg(any(target_env = "musl"))]
|
||||
#[cfg(all(not(feature = "align"), target_env = "musl"))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(not(any(target_env = "musl")))]
|
||||
#[cfg(all(not(feature = "align"), not(target_env = "musl")))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_env = "musl",
|
||||
target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_env = "musl",
|
||||
target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(target_env = "musl"),
|
||||
target_arch = "x86"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(target_env = "musl"),
|
||||
not(target_arch = "x86")),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_cond_t {
|
||||
#[cfg(any(target_env = "musl"))]
|
||||
#[cfg(all(not(feature = "align"), target_env = "musl"))]
|
||||
__align: [*const ::c_void; 0],
|
||||
#[cfg(not(any(target_env = "musl")))]
|
||||
#[cfg(not(any(feature = "align", target_env = "musl")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_COND_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_condattr_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
|
||||
}
|
||||
|
@ -2006,18 +2077,17 @@ pub const RTLD_NOW: ::c_int = 0x2;
|
|||
|
||||
pub const TCP_MD5SIG: ::c_int = 14;
|
||||
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
}
|
||||
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
|
||||
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
|
||||
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
|
||||
|
|
|
@ -69,3 +69,20 @@ macro_rules! f {
|
|||
macro_rules! __item {
|
||||
($i:item) => ($i)
|
||||
}
|
||||
|
||||
#[allow(unused_macros)]
|
||||
macro_rules! align_const {
|
||||
($($(#[$attr:meta])* pub const $name:ident : $t1:ty = $t2:ident { $($field:tt)* };)*) => ($(
|
||||
#[cfg(feature = "align")]
|
||||
$(#[$attr])*
|
||||
pub const $name : $t1 = $t2 {
|
||||
$($field)*
|
||||
};
|
||||
#[cfg(not(feature = "align"))]
|
||||
$(#[$attr])*
|
||||
pub const $name : $t1 = $t2 {
|
||||
$($field)*
|
||||
__align: [],
|
||||
};
|
||||
)*)
|
||||
}
|
||||
|
|
|
@ -238,34 +238,80 @@ s! {
|
|||
__size: [u64; 7]
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutex_t { // Unverified
|
||||
#[cfg(any(target_arch = "mips", target_arch = "arm",
|
||||
target_arch = "powerpc"))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips", target_arch = "arm",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_rwlock_t { // Unverified
|
||||
#[cfg(any(target_arch = "mips", target_arch = "arm",
|
||||
target_arch = "powerpc"))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips", target_arch = "arm",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutexattr_t { // Unverified
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64")))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(all(not(feature = "align"),
|
||||
not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
|
||||
}
|
||||
|
@ -275,12 +321,16 @@ s! {
|
|||
__pshared: ::c_int,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(8)))]
|
||||
pub struct pthread_cond_t { // Unverified
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_COND_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_condattr_t { // Unverified
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
|
||||
}
|
||||
|
@ -288,18 +338,17 @@ s! {
|
|||
}
|
||||
|
||||
// unverified constants
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
}
|
||||
pub const NCCS: usize = 32;
|
||||
pub const __SIZEOF_PTHREAD_ATTR_T: usize = 56;
|
||||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
|
||||
|
|
|
@ -72,32 +72,47 @@ s! {
|
|||
__unused5: *mut ::c_void,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_mutex_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_rwlock_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_mutexattr_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_rwlockattr_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align", target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_cond_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [*const ::c_void; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_COND_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_condattr_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
|
||||
}
|
||||
|
@ -747,18 +762,18 @@ pub const RTLD_NOW: ::c_int = 0x2;
|
|||
|
||||
pub const TCP_MD5SIG: ::c_int = 14;
|
||||
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
}
|
||||
|
||||
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
|
||||
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
|
||||
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use pthread_mutex_t;
|
||||
|
||||
pub type c_char = i8;
|
||||
pub type c_long = i32;
|
||||
pub type c_ulong = u32;
|
||||
|
@ -278,60 +280,56 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
|
|||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
|
||||
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
pub const O_LARGEFILE: ::c_int = 0x2000;
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use pthread_mutex_t;
|
||||
|
||||
pub type blkcnt_t = i64;
|
||||
pub type blksize_t = i64;
|
||||
pub type c_char = i8;
|
||||
|
@ -262,60 +264,56 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
|
|||
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
|
||||
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
pub const O_LARGEFILE: ::c_int = 0;
|
||||
|
||||
|
|
|
@ -71,14 +71,32 @@ s! {
|
|||
__unused5: *mut ::c_void,
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "x86")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "x86")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutex_t {
|
||||
#[cfg(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32")))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32"))))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
|
@ -87,14 +105,32 @@ s! {
|
|||
size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "x86")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
target_arch = "x86_64",
|
||||
target_arch = "x86")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_rwlock_t {
|
||||
#[cfg(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32")))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
target_pointer_width = "32"))))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc",
|
||||
all(target_arch = "x86_64",
|
||||
|
@ -103,39 +139,78 @@ s! {
|
|||
size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl"))),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutexattr_t {
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
#[cfg(all(not(features = "align"),
|
||||
any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64", target_arch = "aarch64")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(all(target_arch = "aarch64", target_env = "gnu"))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(all(target_arch = "aarch64", target_env = "musl"))]
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl"))))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(all(not(features = "align"),
|
||||
not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64",
|
||||
all(target_arch = "aarch64", target_env = "musl")))))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_env = "musl", target_pointer_width = "32")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(target_env = "musl"),
|
||||
target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_rwlockattr_t {
|
||||
#[cfg(any(target_env = "musl"))]
|
||||
#[cfg(all(not(feature = "align"), target_env = "musl"))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(not(any(target_env = "musl")))]
|
||||
#[cfg(all(not(feature = "align"), not(target_env = "musl")))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_env = "musl",
|
||||
target_pointer_width = "32"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_env = "musl",
|
||||
target_pointer_width = "64"),
|
||||
repr(align(8)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(target_env = "musl"),
|
||||
target_arch = "x86"),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(target_env = "musl"),
|
||||
not(target_arch = "x86")),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_cond_t {
|
||||
#[cfg(any(target_env = "musl"))]
|
||||
#[cfg(all(not(feature = "align"), target_env = "musl"))]
|
||||
__align: [*const ::c_void; 0],
|
||||
#[cfg(not(any(target_env = "musl")))]
|
||||
#[cfg(not(any(feature = "align", target_env = "musl")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_COND_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_condattr_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
|
||||
}
|
||||
|
@ -792,18 +867,17 @@ pub const RTLD_NOW: ::c_int = 0x2;
|
|||
|
||||
pub const TCP_MD5SIG: ::c_int = 14;
|
||||
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
}
|
||||
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
|
||||
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
|
||||
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! 32-bit specific definitions for linux-like values
|
||||
|
||||
use pthread_mutex_t;
|
||||
|
||||
pub type c_long = i32;
|
||||
pub type c_ulong = u32;
|
||||
pub type clock_t = i32;
|
||||
|
@ -299,60 +301,56 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
|
|||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
|
||||
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0,
|
||||
0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
pub const PTRACE_GETFPREGS: ::c_uint = 14;
|
||||
pub const PTRACE_SETFPREGS: ::c_uint = 15;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! AArch64-specific definitions for 64-bit linux-like values
|
||||
|
||||
use pthread_mutex_t;
|
||||
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
pub type c_char = u8;
|
||||
|
@ -386,33 +388,32 @@ pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8;
|
|||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48;
|
||||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8;
|
||||
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
pub const O_DIRECT: ::c_int = 0x10000;
|
||||
pub const O_DIRECTORY: ::c_int = 0x4000;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use pthread_mutex_t;
|
||||
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
|
||||
|
@ -21,60 +23,56 @@ s! {
|
|||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
|
||||
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
// Syscall table
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! PowerPC64-specific definitions for 64-bit linux-like values
|
||||
|
||||
use pthread_mutex_t;
|
||||
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
pub type c_char = u8;
|
||||
|
@ -373,60 +375,56 @@ pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
|
|||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
|
||||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
|
||||
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "little")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
#[cfg(target_endian = "big")]
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
pub const O_DIRECTORY: ::c_int = 0x4000;
|
||||
pub const O_NOFOLLOW: ::c_int = 0x8000;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
//! SPARC64-specific definitions for 64-bit linux-like values
|
||||
|
||||
use pthread_mutex_t;
|
||||
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
pub type c_char = i8;
|
||||
|
@ -349,30 +351,29 @@ pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
|
|||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
|
||||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
|
||||
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
pub const O_DIRECTORY: ::c_int = 0o200000;
|
||||
pub const O_NOFOLLOW: ::c_int = 0o400000;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use pthread_mutex_t;
|
||||
|
||||
pub type c_long = i32;
|
||||
pub type c_ulong = u32;
|
||||
|
||||
|
@ -21,30 +23,29 @@ s! {
|
|||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 44;
|
||||
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
// Syscall table
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use pthread_mutex_t;
|
||||
|
||||
pub type blkcnt_t = i64;
|
||||
pub type blksize_t = i64;
|
||||
pub type c_char = u8;
|
||||
|
@ -376,30 +378,29 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
|
|||
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
|
||||
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
::pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =
|
||||
pthread_mutex_t {
|
||||
size: [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
pub const EADDRINUSE: ::c_int = 98;
|
||||
pub const EADDRNOTAVAIL: ::c_int = 99;
|
||||
|
|
|
@ -224,34 +224,80 @@ s! {
|
|||
pub ifa_data: *mut ::c_void
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutex_t {
|
||||
#[cfg(any(target_arch = "mips", target_arch = "arm",
|
||||
target_arch = "powerpc"))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips", target_arch = "arm",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_rwlock_t {
|
||||
#[cfg(any(target_arch = "mips", target_arch = "arm",
|
||||
target_arch = "powerpc"))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips", target_arch = "arm",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutexattr_t {
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64")))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(all(not(feature = "align"),
|
||||
not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
|
||||
}
|
||||
|
@ -261,12 +307,16 @@ s! {
|
|||
__pshared: ::c_int,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(8)))]
|
||||
pub struct pthread_cond_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_COND_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_condattr_t {
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
|
||||
}
|
||||
|
@ -1116,18 +1166,17 @@ pub const RTLD_NOW: ::c_int = 0x2;
|
|||
|
||||
pub const TCP_MD5SIG: ::c_int = 14;
|
||||
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
__align: [],
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
align_const! {
|
||||
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
|
||||
size: [0; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
};
|
||||
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
|
||||
size: [0; __SIZEOF_PTHREAD_COND_T],
|
||||
};
|
||||
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
|
||||
size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
};
|
||||
}
|
||||
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
|
||||
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
|
||||
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
|
||||
|
|
|
@ -218,43 +218,93 @@ s! {
|
|||
__align: [::c_long; 0],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutex_t { // ToDo
|
||||
#[cfg(any(target_arch = "mips", target_arch = "arm",
|
||||
target_arch = "powerpc"))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips", target_arch = "arm",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
not(any(target_pointer_width = "32",
|
||||
target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_mutexattr_t { // ToDo
|
||||
#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64")))]
|
||||
__align: [::c_int; 0],
|
||||
#[cfg(all(not(feature = "align"),
|
||||
not(any(target_arch = "x86_64", target_arch = "powerpc64",
|
||||
target_arch = "mips64", target_arch = "s390x",
|
||||
target_arch = "sparc64"))))]
|
||||
__align: [::c_long; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(8)))]
|
||||
pub struct pthread_cond_t { // ToDo
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_COND_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "align", repr(align(4)))]
|
||||
pub struct pthread_condattr_t { // ToDo
|
||||
#[cfg(not(feature = "align"))]
|
||||
__align: [::c_int; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
|
||||
}
|
||||
|
||||
#[cfg_attr(all(feature = "align",
|
||||
target_pointer_width = "32",
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")),
|
||||
repr(align(4)))]
|
||||
#[cfg_attr(all(feature = "align",
|
||||
any(target_pointer_width = "64",
|
||||
not(any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))),
|
||||
repr(align(8)))]
|
||||
pub struct pthread_rwlock_t { // ToDo
|
||||
#[cfg(any(target_arch = "mips", target_arch = "arm",
|
||||
target_arch = "powerpc"))]
|
||||
#[cfg(all(not(feature = "align"),
|
||||
any(target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_long; 0],
|
||||
#[cfg(not(any(target_arch = "mips", target_arch = "arm",
|
||||
#[cfg(not(any(feature = "align",
|
||||
target_arch = "mips",
|
||||
target_arch = "arm",
|
||||
target_arch = "powerpc")))]
|
||||
__align: [::c_longlong; 0],
|
||||
size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
|
||||
|
|
Loading…
Reference in New Issue