From a4a688d9a5493581d235bd3e53bdf0b144ee673d Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Thu, 5 Aug 2021 22:35:40 +0200 Subject: [PATCH 1/5] adding CUDA Session Executor option for Linux --- README.md | 10 + .../src/generated/linux/x86_64/bindings.rs | 12731 ++-------------- onnxruntime-sys/wrapper.h | 2 + onnxruntime/src/session.rs | 16 + 4 files changed, 1666 insertions(+), 11093 deletions(-) diff --git a/README.md b/README.md index a025ed51..32cfe030 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,16 @@ environment variable `ORT_USE_CUDA=1` (only supports Linux or Windows). Until the build script allow compilation of the runtime, see the [compilation notes](ONNX_Compilation_Notes.md) for some details on the process. +### Note on using CUDA + +To use CUDA you will need to set `ORT_USE_CUDA=1` but also to set your session with the method `use_cuda` as such: + +``` + let mut session = environment + .new_session_builder()? + .use_cuda(0)? +``` + ### Note on 'ORT_STRATEGY=system' When using `ORT_STRATEGY=system`, executing a built crate binary (for example the tests) might fail, at least on macOS, diff --git a/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs b/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs index afcbbbb4..1eb6967f 100644 --- a/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs +++ b/onnxruntime-sys/src/generated/linux/x86_64/bindings.rs @@ -1,11697 +1,2274 @@ /* automatically generated by rust-bindgen 0.59.1 */ -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit { - storage: Storage, -} -impl __BindgenBitfieldUnit { - #[inline] - pub const fn new(storage: Storage) -> Self { - Self { storage } - } -} -impl __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ - #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - byte & mask == mask - } - #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } - } - #[inline] - pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); - let mut val = 0; - for i in 0..(bit_width as usize) { - if self.get_bit(i + bit_offset) { - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - val |= 1 << index; - } - } - val - } - #[inline] - pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); - for i in 0..(bit_width as usize) { - let mask = 1 << i; - let val_bit_is_set = val & mask == mask; - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - self.set_bit(index + bit_offset, val_bit_is_set); - } - } -} -pub const __API_TO_BE_DEPRECATED: u32 = 100000; -pub const __MAC_10_0: u32 = 1000; -pub const __MAC_10_1: u32 = 1010; -pub const __MAC_10_2: u32 = 1020; -pub const __MAC_10_3: u32 = 1030; -pub const __MAC_10_4: u32 = 1040; -pub const __MAC_10_5: u32 = 1050; -pub const __MAC_10_6: u32 = 1060; -pub const __MAC_10_7: u32 = 1070; -pub const __MAC_10_8: u32 = 1080; -pub const __MAC_10_9: u32 = 1090; -pub const __MAC_10_10: u32 = 101000; -pub const __MAC_10_10_2: u32 = 101002; -pub const __MAC_10_10_3: u32 = 101003; -pub const __MAC_10_11: u32 = 101100; -pub const __MAC_10_11_2: u32 = 101102; -pub const __MAC_10_11_3: u32 = 101103; -pub const __MAC_10_11_4: u32 = 101104; -pub const __MAC_10_12: u32 = 101200; -pub const __MAC_10_12_1: u32 = 101201; -pub const __MAC_10_12_2: u32 = 101202; -pub const __MAC_10_12_4: u32 = 101204; -pub const __MAC_10_13: u32 = 101300; -pub const __MAC_10_13_1: u32 = 101301; -pub const __MAC_10_13_2: u32 = 101302; -pub const __MAC_10_13_4: u32 = 101304; -pub const __MAC_10_14: u32 = 101400; -pub const __MAC_10_14_1: u32 = 101401; -pub const __MAC_10_14_4: u32 = 101404; -pub const __MAC_10_14_6: u32 = 101406; -pub const __MAC_10_15: u32 = 101500; -pub const __MAC_10_15_1: u32 = 101501; -pub const __MAC_10_15_4: u32 = 101504; -pub const __MAC_10_16: u32 = 101600; -pub const __MAC_11_0: u32 = 110000; -pub const __MAC_11_1: u32 = 110100; -pub const __MAC_11_3: u32 = 110300; -pub const __IPHONE_2_0: u32 = 20000; -pub const __IPHONE_2_1: u32 = 20100; -pub const __IPHONE_2_2: u32 = 20200; -pub const __IPHONE_3_0: u32 = 30000; -pub const __IPHONE_3_1: u32 = 30100; -pub const __IPHONE_3_2: u32 = 30200; -pub const __IPHONE_4_0: u32 = 40000; -pub const __IPHONE_4_1: u32 = 40100; -pub const __IPHONE_4_2: u32 = 40200; -pub const __IPHONE_4_3: u32 = 40300; -pub const __IPHONE_5_0: u32 = 50000; -pub const __IPHONE_5_1: u32 = 50100; -pub const __IPHONE_6_0: u32 = 60000; -pub const __IPHONE_6_1: u32 = 60100; -pub const __IPHONE_7_0: u32 = 70000; -pub const __IPHONE_7_1: u32 = 70100; -pub const __IPHONE_8_0: u32 = 80000; -pub const __IPHONE_8_1: u32 = 80100; -pub const __IPHONE_8_2: u32 = 80200; -pub const __IPHONE_8_3: u32 = 80300; -pub const __IPHONE_8_4: u32 = 80400; -pub const __IPHONE_9_0: u32 = 90000; -pub const __IPHONE_9_1: u32 = 90100; -pub const __IPHONE_9_2: u32 = 90200; -pub const __IPHONE_9_3: u32 = 90300; -pub const __IPHONE_10_0: u32 = 100000; -pub const __IPHONE_10_1: u32 = 100100; -pub const __IPHONE_10_2: u32 = 100200; -pub const __IPHONE_10_3: u32 = 100300; -pub const __IPHONE_11_0: u32 = 110000; -pub const __IPHONE_11_1: u32 = 110100; -pub const __IPHONE_11_2: u32 = 110200; -pub const __IPHONE_11_3: u32 = 110300; -pub const __IPHONE_11_4: u32 = 110400; -pub const __IPHONE_12_0: u32 = 120000; -pub const __IPHONE_12_1: u32 = 120100; -pub const __IPHONE_12_2: u32 = 120200; -pub const __IPHONE_12_3: u32 = 120300; -pub const __IPHONE_12_4: u32 = 120400; -pub const __IPHONE_13_0: u32 = 130000; -pub const __IPHONE_13_1: u32 = 130100; -pub const __IPHONE_13_2: u32 = 130200; -pub const __IPHONE_13_3: u32 = 130300; -pub const __IPHONE_13_4: u32 = 130400; -pub const __IPHONE_13_5: u32 = 130500; -pub const __IPHONE_13_6: u32 = 130600; -pub const __IPHONE_13_7: u32 = 130700; -pub const __IPHONE_14_0: u32 = 140000; -pub const __IPHONE_14_1: u32 = 140100; -pub const __IPHONE_14_2: u32 = 140200; -pub const __IPHONE_14_3: u32 = 140300; -pub const __IPHONE_14_5: u32 = 140500; -pub const __TVOS_9_0: u32 = 90000; -pub const __TVOS_9_1: u32 = 90100; -pub const __TVOS_9_2: u32 = 90200; -pub const __TVOS_10_0: u32 = 100000; -pub const __TVOS_10_0_1: u32 = 100001; -pub const __TVOS_10_1: u32 = 100100; -pub const __TVOS_10_2: u32 = 100200; -pub const __TVOS_11_0: u32 = 110000; -pub const __TVOS_11_1: u32 = 110100; -pub const __TVOS_11_2: u32 = 110200; -pub const __TVOS_11_3: u32 = 110300; -pub const __TVOS_11_4: u32 = 110400; -pub const __TVOS_12_0: u32 = 120000; -pub const __TVOS_12_1: u32 = 120100; -pub const __TVOS_12_2: u32 = 120200; -pub const __TVOS_12_3: u32 = 120300; -pub const __TVOS_12_4: u32 = 120400; -pub const __TVOS_13_0: u32 = 130000; -pub const __TVOS_13_2: u32 = 130200; -pub const __TVOS_13_3: u32 = 130300; -pub const __TVOS_13_4: u32 = 130400; -pub const __TVOS_14_0: u32 = 140000; -pub const __TVOS_14_1: u32 = 140100; -pub const __TVOS_14_2: u32 = 140200; -pub const __TVOS_14_3: u32 = 140300; -pub const __TVOS_14_5: u32 = 140500; -pub const __WATCHOS_1_0: u32 = 10000; -pub const __WATCHOS_2_0: u32 = 20000; -pub const __WATCHOS_2_1: u32 = 20100; -pub const __WATCHOS_2_2: u32 = 20200; -pub const __WATCHOS_3_0: u32 = 30000; -pub const __WATCHOS_3_1: u32 = 30100; -pub const __WATCHOS_3_1_1: u32 = 30101; -pub const __WATCHOS_3_2: u32 = 30200; -pub const __WATCHOS_4_0: u32 = 40000; -pub const __WATCHOS_4_1: u32 = 40100; -pub const __WATCHOS_4_2: u32 = 40200; -pub const __WATCHOS_4_3: u32 = 40300; -pub const __WATCHOS_5_0: u32 = 50000; -pub const __WATCHOS_5_1: u32 = 50100; -pub const __WATCHOS_5_2: u32 = 50200; -pub const __WATCHOS_5_3: u32 = 50300; -pub const __WATCHOS_6_0: u32 = 60000; -pub const __WATCHOS_6_1: u32 = 60100; -pub const __WATCHOS_6_2: u32 = 60200; -pub const __WATCHOS_7_0: u32 = 70000; -pub const __WATCHOS_7_1: u32 = 70100; -pub const __WATCHOS_7_2: u32 = 70200; -pub const __WATCHOS_7_3: u32 = 70300; -pub const __WATCHOS_7_4: u32 = 70400; -pub const MAC_OS_X_VERSION_10_0: u32 = 1000; -pub const MAC_OS_X_VERSION_10_1: u32 = 1010; -pub const MAC_OS_X_VERSION_10_2: u32 = 1020; -pub const MAC_OS_X_VERSION_10_3: u32 = 1030; -pub const MAC_OS_X_VERSION_10_4: u32 = 1040; -pub const MAC_OS_X_VERSION_10_5: u32 = 1050; -pub const MAC_OS_X_VERSION_10_6: u32 = 1060; -pub const MAC_OS_X_VERSION_10_7: u32 = 1070; -pub const MAC_OS_X_VERSION_10_8: u32 = 1080; -pub const MAC_OS_X_VERSION_10_9: u32 = 1090; -pub const MAC_OS_X_VERSION_10_10: u32 = 101000; -pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002; -pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003; -pub const MAC_OS_X_VERSION_10_11: u32 = 101100; -pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102; -pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103; -pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104; -pub const MAC_OS_X_VERSION_10_12: u32 = 101200; -pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201; -pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202; -pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204; -pub const MAC_OS_X_VERSION_10_13: u32 = 101300; -pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301; -pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302; -pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304; -pub const MAC_OS_X_VERSION_10_14: u32 = 101400; -pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401; -pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404; -pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406; -pub const MAC_OS_X_VERSION_10_15: u32 = 101500; -pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; -pub const MAC_OS_X_VERSION_10_16: u32 = 101600; -pub const MAC_OS_VERSION_11_0: u32 = 110000; -pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __DRIVERKIT_20_0: u32 = 200000; -pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; -pub const __DARWIN_UNIX03: u32 = 1; -pub const __DARWIN_64_BIT_INO_T: u32 = 1; -pub const __DARWIN_VERS_1050: u32 = 1; -pub const __DARWIN_NON_CANCELABLE: u32 = 0; -pub const __DARWIN_SUF_64_BIT_INO_T: &'static [u8; 9usize] = b"$INODE64\0"; -pub const __DARWIN_SUF_1050: &'static [u8; 6usize] = b"$1050\0"; -pub const __DARWIN_SUF_EXTSN: &'static [u8; 14usize] = b"$DARWIN_EXTSN\0"; -pub const __DARWIN_C_ANSI: u32 = 4096; -pub const __DARWIN_C_FULL: u32 = 900000; -pub const __DARWIN_C_LEVEL: u32 = 900000; -pub const __STDC_WANT_LIB_EXT1__: u32 = 1; -pub const __DARWIN_NO_LONG_LONG: u32 = 0; -pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1; -pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1; -pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3; -pub const __PTHREAD_SIZE__: u32 = 8176; -pub const __PTHREAD_ATTR_SIZE__: u32 = 56; -pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8; -pub const __PTHREAD_MUTEX_SIZE__: u32 = 56; -pub const __PTHREAD_CONDATTR_SIZE__: u32 = 8; -pub const __PTHREAD_COND_SIZE__: u32 = 40; -pub const __PTHREAD_ONCE_SIZE__: u32 = 8; -pub const __PTHREAD_RWLOCK_SIZE__: u32 = 192; -pub const __PTHREAD_RWLOCKATTR_SIZE__: u32 = 16; -pub const __DARWIN_WCHAR_MIN: i32 = -2147483648; -pub const _FORTIFY_SOURCE: u32 = 2; -pub const __DARWIN_NSIG: u32 = 32; -pub const NSIG: u32 = 32; -pub const _I386_SIGNAL_H_: u32 = 1; -pub const SIGHUP: u32 = 1; -pub const SIGINT: u32 = 2; -pub const SIGQUIT: u32 = 3; -pub const SIGILL: u32 = 4; -pub const SIGTRAP: u32 = 5; -pub const SIGABRT: u32 = 6; -pub const SIGIOT: u32 = 6; -pub const SIGEMT: u32 = 7; -pub const SIGFPE: u32 = 8; -pub const SIGKILL: u32 = 9; -pub const SIGBUS: u32 = 10; -pub const SIGSEGV: u32 = 11; -pub const SIGSYS: u32 = 12; -pub const SIGPIPE: u32 = 13; -pub const SIGALRM: u32 = 14; -pub const SIGTERM: u32 = 15; -pub const SIGURG: u32 = 16; -pub const SIGSTOP: u32 = 17; -pub const SIGTSTP: u32 = 18; -pub const SIGCONT: u32 = 19; -pub const SIGCHLD: u32 = 20; -pub const SIGTTIN: u32 = 21; -pub const SIGTTOU: u32 = 22; -pub const SIGIO: u32 = 23; -pub const SIGXCPU: u32 = 24; -pub const SIGXFSZ: u32 = 25; -pub const SIGVTALRM: u32 = 26; -pub const SIGPROF: u32 = 27; -pub const SIGWINCH: u32 = 28; -pub const SIGINFO: u32 = 29; -pub const SIGUSR1: u32 = 30; -pub const SIGUSR2: u32 = 31; -pub const FP_PREC_24B: u32 = 0; -pub const FP_PREC_53B: u32 = 2; -pub const FP_PREC_64B: u32 = 3; -pub const FP_RND_NEAR: u32 = 0; -pub const FP_RND_DOWN: u32 = 1; -pub const FP_RND_UP: u32 = 2; -pub const FP_CHOP: u32 = 3; -pub const FP_STATE_BYTES: u32 = 512; -pub const _X86_INSTRUCTION_STATE_MAX_INSN_BYTES: u32 = 2380; -pub const _X86_INSTRUCTION_STATE_CACHELINE_SIZE: u32 = 64; -pub const __LASTBRANCH_MAX: u32 = 32; -pub const SIGEV_NONE: u32 = 0; -pub const SIGEV_SIGNAL: u32 = 1; -pub const SIGEV_THREAD: u32 = 3; -pub const ILL_NOOP: u32 = 0; -pub const ILL_ILLOPC: u32 = 1; -pub const ILL_ILLTRP: u32 = 2; -pub const ILL_PRVOPC: u32 = 3; -pub const ILL_ILLOPN: u32 = 4; -pub const ILL_ILLADR: u32 = 5; -pub const ILL_PRVREG: u32 = 6; -pub const ILL_COPROC: u32 = 7; -pub const ILL_BADSTK: u32 = 8; -pub const FPE_NOOP: u32 = 0; -pub const FPE_FLTDIV: u32 = 1; -pub const FPE_FLTOVF: u32 = 2; -pub const FPE_FLTUND: u32 = 3; -pub const FPE_FLTRES: u32 = 4; -pub const FPE_FLTINV: u32 = 5; -pub const FPE_FLTSUB: u32 = 6; -pub const FPE_INTDIV: u32 = 7; -pub const FPE_INTOVF: u32 = 8; -pub const SEGV_NOOP: u32 = 0; -pub const SEGV_MAPERR: u32 = 1; -pub const SEGV_ACCERR: u32 = 2; -pub const BUS_NOOP: u32 = 0; -pub const BUS_ADRALN: u32 = 1; -pub const BUS_ADRERR: u32 = 2; -pub const BUS_OBJERR: u32 = 3; -pub const TRAP_BRKPT: u32 = 1; -pub const TRAP_TRACE: u32 = 2; -pub const CLD_NOOP: u32 = 0; -pub const CLD_EXITED: u32 = 1; -pub const CLD_KILLED: u32 = 2; -pub const CLD_DUMPED: u32 = 3; -pub const CLD_TRAPPED: u32 = 4; -pub const CLD_STOPPED: u32 = 5; -pub const CLD_CONTINUED: u32 = 6; -pub const POLL_IN: u32 = 1; -pub const POLL_OUT: u32 = 2; -pub const POLL_MSG: u32 = 3; -pub const POLL_ERR: u32 = 4; -pub const POLL_PRI: u32 = 5; -pub const POLL_HUP: u32 = 6; -pub const SA_ONSTACK: u32 = 1; -pub const SA_RESTART: u32 = 2; -pub const SA_RESETHAND: u32 = 4; -pub const SA_NOCLDSTOP: u32 = 8; -pub const SA_NODEFER: u32 = 16; -pub const SA_NOCLDWAIT: u32 = 32; -pub const SA_SIGINFO: u32 = 64; -pub const SA_USERTRAMP: u32 = 256; -pub const SA_64REGSET: u32 = 512; -pub const SA_USERSPACE_MASK: u32 = 127; -pub const SIG_BLOCK: u32 = 1; -pub const SIG_UNBLOCK: u32 = 2; -pub const SIG_SETMASK: u32 = 3; -pub const SI_USER: u32 = 65537; -pub const SI_QUEUE: u32 = 65538; -pub const SI_TIMER: u32 = 65539; -pub const SI_ASYNCIO: u32 = 65540; -pub const SI_MESGQ: u32 = 65541; -pub const SS_ONSTACK: u32 = 1; -pub const SS_DISABLE: u32 = 4; -pub const MINSIGSTKSZ: u32 = 32768; -pub const SIGSTKSZ: u32 = 131072; -pub const SV_ONSTACK: u32 = 1; -pub const SV_INTERRUPT: u32 = 2; -pub const SV_RESETHAND: u32 = 4; -pub const SV_NODEFER: u32 = 16; -pub const SV_NOCLDSTOP: u32 = 8; -pub const SV_SIGINFO: u32 = 64; +pub const _FEATURES_H: u32 = 1; +pub const _DEFAULT_SOURCE: u32 = 1; +pub const __GLIBC_USE_ISOC2X: u32 = 0; +pub const __USE_ISOC11: u32 = 1; +pub const __USE_ISOC99: u32 = 1; +pub const __USE_ISOC95: u32 = 1; +pub const __USE_POSIX_IMPLICITLY: u32 = 1; +pub const _POSIX_SOURCE: u32 = 1; +pub const _POSIX_C_SOURCE: u32 = 200809; +pub const __USE_POSIX: u32 = 1; +pub const __USE_POSIX2: u32 = 1; +pub const __USE_POSIX199309: u32 = 1; +pub const __USE_POSIX199506: u32 = 1; +pub const __USE_XOPEN2K: u32 = 1; +pub const __USE_XOPEN2K8: u32 = 1; +pub const _ATFILE_SOURCE: u32 = 1; +pub const __USE_MISC: u32 = 1; +pub const __USE_ATFILE: u32 = 1; +pub const __USE_FORTIFY_LEVEL: u32 = 0; +pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; +pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; +pub const _STDC_PREDEF_H: u32 = 1; +pub const __STDC_IEC_559__: u32 = 1; +pub const __STDC_IEC_559_COMPLEX__: u32 = 1; +pub const __STDC_ISO_10646__: u32 = 201706; +pub const __GNU_LIBRARY__: u32 = 6; +pub const __GLIBC__: u32 = 2; +pub const __GLIBC_MINOR__: u32 = 31; +pub const _SYS_CDEFS_H: u32 = 1; +pub const __glibc_c99_flexarr_available: u32 = 1; pub const __WORDSIZE: u32 = 64; -pub const INT8_MAX: u32 = 127; -pub const INT16_MAX: u32 = 32767; -pub const INT32_MAX: u32 = 2147483647; -pub const INT64_MAX: u64 = 9223372036854775807; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; +pub const __SYSCALL_WORDSIZE: u32 = 64; +pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0; +pub const __HAVE_GENERIC_SELECTION: u32 = 1; +pub const __GLIBC_USE_LIB_EXT2: u32 = 0; +pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; +pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; +pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; +pub const _STDLIB_H: u32 = 1; +pub const WNOHANG: u32 = 1; +pub const WUNTRACED: u32 = 2; +pub const WSTOPPED: u32 = 2; +pub const WEXITED: u32 = 4; +pub const WCONTINUED: u32 = 8; +pub const WNOWAIT: u32 = 16777216; +pub const __WNOTHREAD: u32 = 536870912; +pub const __WALL: u32 = 1073741824; +pub const __WCLONE: u32 = 2147483648; +pub const __ENUM_IDTYPE_T: u32 = 1; +pub const __W_CONTINUED: u32 = 65535; +pub const __WCOREFLAG: u32 = 128; +pub const __HAVE_FLOAT128: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; +pub const __HAVE_FLOAT64X: u32 = 1; +pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; +pub const __HAVE_FLOAT16: u32 = 0; +pub const __HAVE_FLOAT32: u32 = 1; +pub const __HAVE_FLOAT64: u32 = 1; +pub const __HAVE_FLOAT32X: u32 = 1; +pub const __HAVE_FLOAT128X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT16: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT32: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT64: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0; +pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0; +pub const __ldiv_t_defined: u32 = 1; +pub const __lldiv_t_defined: u32 = 1; +pub const RAND_MAX: u32 = 2147483647; +pub const EXIT_FAILURE: u32 = 1; +pub const EXIT_SUCCESS: u32 = 0; +pub const _SYS_TYPES_H: u32 = 1; +pub const _BITS_TYPES_H: u32 = 1; +pub const __TIMESIZE: u32 = 64; +pub const _BITS_TYPESIZES_H: u32 = 1; +pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; +pub const __INO_T_MATCHES_INO64_T: u32 = 1; +pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; +pub const __STATFS_MATCHES_STATFS64: u32 = 1; +pub const __FD_SETSIZE: u32 = 1024; +pub const _BITS_TIME64_H: u32 = 1; +pub const __clock_t_defined: u32 = 1; +pub const __clockid_t_defined: u32 = 1; +pub const __time_t_defined: u32 = 1; +pub const __timer_t_defined: u32 = 1; +pub const _BITS_STDINT_INTN_H: u32 = 1; +pub const __BIT_TYPES_DEFINED__: u32 = 1; +pub const _ENDIAN_H: u32 = 1; +pub const _BITS_ENDIAN_H: u32 = 1; +pub const __LITTLE_ENDIAN: u32 = 1234; +pub const __BIG_ENDIAN: u32 = 4321; +pub const __PDP_ENDIAN: u32 = 3412; +pub const _BITS_ENDIANNESS_H: u32 = 1; +pub const __BYTE_ORDER: u32 = 1234; +pub const __FLOAT_WORD_ORDER: u32 = 1234; +pub const LITTLE_ENDIAN: u32 = 1234; +pub const BIG_ENDIAN: u32 = 4321; +pub const PDP_ENDIAN: u32 = 3412; +pub const BYTE_ORDER: u32 = 1234; +pub const _BITS_BYTESWAP_H: u32 = 1; +pub const _BITS_UINTN_IDENTITY_H: u32 = 1; +pub const _SYS_SELECT_H: u32 = 1; +pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0"; +pub const __sigset_t_defined: u32 = 1; +pub const __timeval_defined: u32 = 1; +pub const _STRUCT_TIMESPEC: u32 = 1; +pub const FD_SETSIZE: u32 = 1024; +pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; +pub const _THREAD_SHARED_TYPES_H: u32 = 1; +pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; +pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; +pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; +pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; +pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; +pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; +pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1; +pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; +pub const __have_pthread_attr_t: u32 = 1; +pub const _ALLOCA_H: u32 = 1; +pub const _STDINT_H: u32 = 1; +pub const _BITS_WCHAR_H: u32 = 1; +pub const _BITS_STDINT_UINTN_H: u32 = 1; pub const INT8_MIN: i32 = -128; pub const INT16_MIN: i32 = -32768; pub const INT32_MIN: i32 = -2147483648; -pub const INT64_MIN: i64 = -9223372036854775808; +pub const INT8_MAX: u32 = 127; +pub const INT16_MAX: u32 = 32767; +pub const INT32_MAX: u32 = 2147483647; pub const UINT8_MAX: u32 = 255; pub const UINT16_MAX: u32 = 65535; pub const UINT32_MAX: u32 = 4294967295; -pub const UINT64_MAX: i32 = -1; pub const INT_LEAST8_MIN: i32 = -128; pub const INT_LEAST16_MIN: i32 = -32768; pub const INT_LEAST32_MIN: i32 = -2147483648; -pub const INT_LEAST64_MIN: i64 = -9223372036854775808; pub const INT_LEAST8_MAX: u32 = 127; pub const INT_LEAST16_MAX: u32 = 32767; pub const INT_LEAST32_MAX: u32 = 2147483647; -pub const INT_LEAST64_MAX: u64 = 9223372036854775807; pub const UINT_LEAST8_MAX: u32 = 255; pub const UINT_LEAST16_MAX: u32 = 65535; pub const UINT_LEAST32_MAX: u32 = 4294967295; -pub const UINT_LEAST64_MAX: i32 = -1; pub const INT_FAST8_MIN: i32 = -128; -pub const INT_FAST16_MIN: i32 = -32768; -pub const INT_FAST32_MIN: i32 = -2147483648; -pub const INT_FAST64_MIN: i64 = -9223372036854775808; +pub const INT_FAST16_MIN: i64 = -9223372036854775808; +pub const INT_FAST32_MIN: i64 = -9223372036854775808; pub const INT_FAST8_MAX: u32 = 127; -pub const INT_FAST16_MAX: u32 = 32767; -pub const INT_FAST32_MAX: u32 = 2147483647; -pub const INT_FAST64_MAX: u64 = 9223372036854775807; +pub const INT_FAST16_MAX: u64 = 9223372036854775807; +pub const INT_FAST32_MAX: u64 = 9223372036854775807; pub const UINT_FAST8_MAX: u32 = 255; -pub const UINT_FAST16_MAX: u32 = 65535; -pub const UINT_FAST32_MAX: u32 = 4294967295; -pub const UINT_FAST64_MAX: i32 = -1; -pub const INTPTR_MAX: u64 = 9223372036854775807; +pub const UINT_FAST16_MAX: i32 = -1; +pub const UINT_FAST32_MAX: i32 = -1; pub const INTPTR_MIN: i64 = -9223372036854775808; +pub const INTPTR_MAX: u64 = 9223372036854775807; pub const UINTPTR_MAX: i32 = -1; -pub const SIZE_MAX: i32 = -1; -pub const RSIZE_MAX: i32 = -1; -pub const WINT_MIN: i32 = -2147483648; -pub const WINT_MAX: u32 = 2147483647; +pub const PTRDIFF_MIN: i64 = -9223372036854775808; +pub const PTRDIFF_MAX: u64 = 9223372036854775807; pub const SIG_ATOMIC_MIN: i32 = -2147483648; pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const PRIO_PROCESS: u32 = 0; -pub const PRIO_PGRP: u32 = 1; -pub const PRIO_USER: u32 = 2; -pub const PRIO_DARWIN_THREAD: u32 = 3; -pub const PRIO_DARWIN_PROCESS: u32 = 4; -pub const PRIO_MIN: i32 = -20; -pub const PRIO_MAX: u32 = 20; -pub const PRIO_DARWIN_BG: u32 = 4096; -pub const PRIO_DARWIN_NONUI: u32 = 4097; -pub const RUSAGE_SELF: u32 = 0; -pub const RUSAGE_CHILDREN: i32 = -1; -pub const RUSAGE_INFO_V0: u32 = 0; -pub const RUSAGE_INFO_V1: u32 = 1; -pub const RUSAGE_INFO_V2: u32 = 2; -pub const RUSAGE_INFO_V3: u32 = 3; -pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_V5: u32 = 5; -pub const RUSAGE_INFO_CURRENT: u32 = 5; -pub const RU_PROC_RUNS_RESLIDE: u32 = 1; -pub const RLIMIT_CPU: u32 = 0; -pub const RLIMIT_FSIZE: u32 = 1; -pub const RLIMIT_DATA: u32 = 2; -pub const RLIMIT_STACK: u32 = 3; -pub const RLIMIT_CORE: u32 = 4; -pub const RLIMIT_AS: u32 = 5; -pub const RLIMIT_RSS: u32 = 5; -pub const RLIMIT_MEMLOCK: u32 = 6; -pub const RLIMIT_NPROC: u32 = 7; -pub const RLIMIT_NOFILE: u32 = 8; -pub const RLIM_NLIMITS: u32 = 9; -pub const _RLIMIT_POSIX_FLAG: u32 = 4096; -pub const RLIMIT_WAKEUPS_MONITOR: u32 = 1; -pub const RLIMIT_CPU_USAGE_MONITOR: u32 = 2; -pub const RLIMIT_THREAD_CPULIMITS: u32 = 3; -pub const RLIMIT_FOOTPRINT_INTERVAL: u32 = 4; -pub const WAKEMON_ENABLE: u32 = 1; -pub const WAKEMON_DISABLE: u32 = 2; -pub const WAKEMON_GET_PARAMS: u32 = 4; -pub const WAKEMON_SET_DEFAULTS: u32 = 8; -pub const WAKEMON_MAKE_FATAL: u32 = 16; -pub const CPUMON_MAKE_FATAL: u32 = 4096; -pub const FOOTPRINT_INTERVAL_RESET: u32 = 1; -pub const IOPOL_TYPE_DISK: u32 = 0; -pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; -pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; -pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; -pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; -pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; -pub const IOPOL_TYPE_VFS_IGNORE_PERMISSIONS: u32 = 7; -pub const IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE: u32 = 8; -pub const IOPOL_SCOPE_PROCESS: u32 = 0; -pub const IOPOL_SCOPE_THREAD: u32 = 1; -pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; -pub const IOPOL_DEFAULT: u32 = 0; -pub const IOPOL_IMPORTANT: u32 = 1; -pub const IOPOL_PASSIVE: u32 = 2; -pub const IOPOL_THROTTLE: u32 = 3; -pub const IOPOL_UTILITY: u32 = 4; -pub const IOPOL_STANDARD: u32 = 5; -pub const IOPOL_APPLICATION: u32 = 5; -pub const IOPOL_NORMAL: u32 = 1; -pub const IOPOL_ATIME_UPDATES_DEFAULT: u32 = 0; -pub const IOPOL_ATIME_UPDATES_OFF: u32 = 1; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT: u32 = 0; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; -pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; -pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; -pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0; -pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1; -pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0; -pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1; -pub const IOPOL_VFS_IGNORE_PERMISSIONS_OFF: u32 = 0; -pub const IOPOL_VFS_IGNORE_PERMISSIONS_ON: u32 = 1; -pub const IOPOL_VFS_SKIP_MTIME_UPDATE_OFF: u32 = 0; -pub const IOPOL_VFS_SKIP_MTIME_UPDATE_ON: u32 = 1; -pub const WNOHANG: u32 = 1; -pub const WUNTRACED: u32 = 2; -pub const WCOREFLAG: u32 = 128; -pub const _WSTOPPED: u32 = 127; -pub const WEXITED: u32 = 4; -pub const WSTOPPED: u32 = 8; -pub const WCONTINUED: u32 = 16; -pub const WNOWAIT: u32 = 32; -pub const WAIT_ANY: i32 = -1; -pub const WAIT_MYPGRP: u32 = 0; -pub const _QUAD_HIGHWORD: u32 = 1; -pub const _QUAD_LOWWORD: u32 = 0; -pub const __DARWIN_LITTLE_ENDIAN: u32 = 1234; -pub const __DARWIN_BIG_ENDIAN: u32 = 4321; -pub const __DARWIN_PDP_ENDIAN: u32 = 3412; -pub const __DARWIN_BYTE_ORDER: u32 = 1234; -pub const LITTLE_ENDIAN: u32 = 1234; -pub const BIG_ENDIAN: u32 = 4321; -pub const PDP_ENDIAN: u32 = 3412; -pub const BYTE_ORDER: u32 = 1234; -pub const EXIT_FAILURE: u32 = 1; -pub const EXIT_SUCCESS: u32 = 0; -pub const RAND_MAX: u32 = 2147483647; -pub const _USE_FORTIFY_LEVEL: u32 = 2; -pub const __HAS_FIXED_CHK_PROTOTYPES: u32 = 1; +pub const SIZE_MAX: i32 = -1; +pub const WINT_MIN: u32 = 0; +pub const WINT_MAX: u32 = 4294967295; +pub const _STRING_H: u32 = 1; +pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; +pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; +pub const _STRINGS_H: u32 = 1; pub const ORT_API_VERSION: u32 = 8; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_longlong; -pub type __uint64_t = ::std::os::raw::c_ulonglong; -pub type __darwin_intptr_t = ::std::os::raw::c_long; -pub type __darwin_natural_t = ::std::os::raw::c_uint; -pub type __darwin_ct_rune_t = ::std::os::raw::c_int; +pub type wchar_t = ::std::os::raw::c_int; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum idtype_t { + P_ALL = 0, + P_PID = 1, + P_PGID = 2, +} +pub type _Float32 = f32; +pub type _Float64 = f64; +pub type _Float32x = f64; +pub type _Float64x = u128; #[repr(C)] -#[derive(Copy, Clone)] -pub union __mbstate_t { - pub __mbstate8: [::std::os::raw::c_char; 128usize], - pub _mbstateL: ::std::os::raw::c_longlong, +#[derive(Debug, Copy, Clone)] +pub struct div_t { + pub quot: ::std::os::raw::c_int, + pub rem: ::std::os::raw::c_int, } #[test] -fn bindgen_test_layout___mbstate_t() { +fn bindgen_test_layout_div_t() { assert_eq!( - ::std::mem::size_of::<__mbstate_t>(), - 128usize, - concat!("Size of: ", stringify!(__mbstate_t)) + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(div_t)) ); assert_eq!( - ::std::mem::align_of::<__mbstate_t>(), - 8usize, - concat!("Alignment of ", stringify!(__mbstate_t)) + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(div_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__mbstate8 as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(__mbstate_t), + stringify!(div_t), "::", - stringify!(__mbstate8) + stringify!(quot) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>()))._mbstateL as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, + 4usize, concat!( "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(_mbstateL) - ) - ); -} -pub type __darwin_mbstate_t = __mbstate_t; -pub type __darwin_ptrdiff_t = ::std::os::raw::c_long; -pub type __darwin_size_t = ::std::os::raw::c_ulong; -pub type __darwin_va_list = __builtin_va_list; -pub type __darwin_wchar_t = ::std::os::raw::c_int; -pub type __darwin_rune_t = __darwin_wchar_t; -pub type __darwin_wint_t = ::std::os::raw::c_uint; -pub type __darwin_clock_t = ::std::os::raw::c_ulong; -pub type __darwin_socklen_t = __uint32_t; -pub type __darwin_ssize_t = ::std::os::raw::c_long; -pub type __darwin_time_t = ::std::os::raw::c_long; -pub type __darwin_blkcnt_t = __int64_t; -pub type __darwin_blksize_t = __int32_t; -pub type __darwin_dev_t = __int32_t; -pub type __darwin_fsblkcnt_t = ::std::os::raw::c_uint; -pub type __darwin_fsfilcnt_t = ::std::os::raw::c_uint; -pub type __darwin_gid_t = __uint32_t; -pub type __darwin_id_t = __uint32_t; -pub type __darwin_ino64_t = __uint64_t; -pub type __darwin_ino_t = __darwin_ino64_t; -pub type __darwin_mach_port_name_t = __darwin_natural_t; -pub type __darwin_mach_port_t = __darwin_mach_port_name_t; -pub type __darwin_mode_t = __uint16_t; -pub type __darwin_off_t = __int64_t; -pub type __darwin_pid_t = __int32_t; -pub type __darwin_sigset_t = __uint32_t; -pub type __darwin_suseconds_t = __int32_t; -pub type __darwin_uid_t = __uint32_t; -pub type __darwin_useconds_t = __uint32_t; -pub type __darwin_uuid_t = [::std::os::raw::c_uchar; 16usize]; -pub type __darwin_uuid_string_t = [::std::os::raw::c_char; 37usize]; + stringify!(div_t), + "::", + stringify!(rem) + ) + ); +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __darwin_pthread_handler_rec { - pub __routine: ::std::option::Option, - pub __arg: *mut ::std::os::raw::c_void, - pub __next: *mut __darwin_pthread_handler_rec, +pub struct ldiv_t { + pub quot: ::std::os::raw::c_long, + pub rem: ::std::os::raw::c_long, } #[test] -fn bindgen_test_layout___darwin_pthread_handler_rec() { +fn bindgen_test_layout_ldiv_t() { assert_eq!( - ::std::mem::size_of::<__darwin_pthread_handler_rec>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_pthread_handler_rec)) + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(ldiv_t)) ); assert_eq!( - ::std::mem::align_of::<__darwin_pthread_handler_rec>(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec)) + concat!("Alignment of ", stringify!(ldiv_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__routine as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), + stringify!(ldiv_t), "::", - stringify!(__routine) + stringify!(quot) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__arg as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__arg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__next as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), + stringify!(ldiv_t), "::", - stringify!(__next) + stringify!(rem) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_attr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 56usize], +pub struct lldiv_t { + pub quot: ::std::os::raw::c_longlong, + pub rem: ::std::os::raw::c_longlong, } #[test] -fn bindgen_test_layout__opaque_pthread_attr_t() { +fn bindgen_test_layout_lldiv_t() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_attr_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_attr_t)) + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(lldiv_t)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_attr_t>(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_attr_t)) + concat!("Alignment of ", stringify!(lldiv_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__sig as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_attr_t), + stringify!(lldiv_t), "::", - stringify!(__sig) + stringify!(quot) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__opaque as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_attr_t), + stringify!(lldiv_t), "::", - stringify!(__opaque) + stringify!(rem) ) ); } +extern "C" { + pub fn __ctype_get_mb_cur_max() -> usize; +} +extern "C" { + pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64; +} +extern "C" { + pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn strtod( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> f64; +} +extern "C" { + pub fn strtof( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> f32; +} +extern "C" { + pub fn strtold( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> u128; +} +extern "C" { + pub fn strtol( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn strtoul( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn strtoq( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn strtouq( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn strtoll( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn strtoull( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; +} +pub type __u_char = ::std::os::raw::c_uchar; +pub type __u_short = ::std::os::raw::c_ushort; +pub type __u_int = ::std::os::raw::c_uint; +pub type __u_long = ::std::os::raw::c_ulong; +pub type __int8_t = ::std::os::raw::c_schar; +pub type __uint8_t = ::std::os::raw::c_uchar; +pub type __int16_t = ::std::os::raw::c_short; +pub type __uint16_t = ::std::os::raw::c_ushort; +pub type __int32_t = ::std::os::raw::c_int; +pub type __uint32_t = ::std::os::raw::c_uint; +pub type __int64_t = ::std::os::raw::c_long; +pub type __uint64_t = ::std::os::raw::c_ulong; +pub type __int_least8_t = __int8_t; +pub type __uint_least8_t = __uint8_t; +pub type __int_least16_t = __int16_t; +pub type __uint_least16_t = __uint16_t; +pub type __int_least32_t = __int32_t; +pub type __uint_least32_t = __uint32_t; +pub type __int_least64_t = __int64_t; +pub type __uint_least64_t = __uint64_t; +pub type __quad_t = ::std::os::raw::c_long; +pub type __u_quad_t = ::std::os::raw::c_ulong; +pub type __intmax_t = ::std::os::raw::c_long; +pub type __uintmax_t = ::std::os::raw::c_ulong; +pub type __dev_t = ::std::os::raw::c_ulong; +pub type __uid_t = ::std::os::raw::c_uint; +pub type __gid_t = ::std::os::raw::c_uint; +pub type __ino_t = ::std::os::raw::c_ulong; +pub type __ino64_t = ::std::os::raw::c_ulong; +pub type __mode_t = ::std::os::raw::c_uint; +pub type __nlink_t = ::std::os::raw::c_ulong; +pub type __off_t = ::std::os::raw::c_long; +pub type __off64_t = ::std::os::raw::c_long; +pub type __pid_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_cond_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 40usize], +pub struct __fsid_t { + pub __val: [::std::os::raw::c_int; 2usize], } #[test] -fn bindgen_test_layout__opaque_pthread_cond_t() { +fn bindgen_test_layout___fsid_t() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_cond_t>(), - 48usize, - concat!("Size of: ", stringify!(_opaque_pthread_cond_t)) + ::std::mem::size_of::<__fsid_t>(), + 8usize, + concat!("Size of: ", stringify!(__fsid_t)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_cond_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_cond_t)) + ::std::mem::align_of::<__fsid_t>(), + 4usize, + concat!("Alignment of ", stringify!(__fsid_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__sig as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_cond_t), - "::", - stringify!(__sig) - ) + stringify!(__fsid_t), + "::", + stringify!(__val) + ) + ); +} +pub type __clock_t = ::std::os::raw::c_long; +pub type __rlim_t = ::std::os::raw::c_ulong; +pub type __rlim64_t = ::std::os::raw::c_ulong; +pub type __id_t = ::std::os::raw::c_uint; +pub type __time_t = ::std::os::raw::c_long; +pub type __useconds_t = ::std::os::raw::c_uint; +pub type __suseconds_t = ::std::os::raw::c_long; +pub type __daddr_t = ::std::os::raw::c_int; +pub type __key_t = ::std::os::raw::c_int; +pub type __clockid_t = ::std::os::raw::c_int; +pub type __timer_t = *mut ::std::os::raw::c_void; +pub type __blksize_t = ::std::os::raw::c_long; +pub type __blkcnt_t = ::std::os::raw::c_long; +pub type __blkcnt64_t = ::std::os::raw::c_long; +pub type __fsblkcnt_t = ::std::os::raw::c_ulong; +pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; +pub type __fsword_t = ::std::os::raw::c_long; +pub type __ssize_t = ::std::os::raw::c_long; +pub type __syscall_slong_t = ::std::os::raw::c_long; +pub type __syscall_ulong_t = ::std::os::raw::c_ulong; +pub type __loff_t = __off64_t; +pub type __caddr_t = *mut ::std::os::raw::c_char; +pub type __intptr_t = ::std::os::raw::c_long; +pub type __socklen_t = ::std::os::raw::c_uint; +pub type __sig_atomic_t = ::std::os::raw::c_int; +pub type u_char = __u_char; +pub type u_short = __u_short; +pub type u_int = __u_int; +pub type u_long = __u_long; +pub type quad_t = __quad_t; +pub type u_quad_t = __u_quad_t; +pub type fsid_t = __fsid_t; +pub type loff_t = __loff_t; +pub type ino_t = __ino_t; +pub type dev_t = __dev_t; +pub type gid_t = __gid_t; +pub type mode_t = __mode_t; +pub type nlink_t = __nlink_t; +pub type uid_t = __uid_t; +pub type off_t = __off_t; +pub type pid_t = __pid_t; +pub type id_t = __id_t; +pub type daddr_t = __daddr_t; +pub type caddr_t = __caddr_t; +pub type key_t = __key_t; +pub type clock_t = __clock_t; +pub type clockid_t = __clockid_t; +pub type time_t = __time_t; +pub type timer_t = __timer_t; +pub type ulong = ::std::os::raw::c_ulong; +pub type ushort = ::std::os::raw::c_ushort; +pub type uint = ::std::os::raw::c_uint; +pub type u_int8_t = __uint8_t; +pub type u_int16_t = __uint16_t; +pub type u_int32_t = __uint32_t; +pub type u_int64_t = __uint64_t; +pub type register_t = ::std::os::raw::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sigset_t { + pub __val: [::std::os::raw::c_ulong; 16usize], +} +#[test] +fn bindgen_test_layout___sigset_t() { + assert_eq!( + ::std::mem::size_of::<__sigset_t>(), + 128usize, + concat!("Size of: ", stringify!(__sigset_t)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__opaque as *const _ as usize }, + ::std::mem::align_of::<__sigset_t>(), 8usize, + concat!("Alignment of ", stringify!(__sigset_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_cond_t), + stringify!(__sigset_t), "::", - stringify!(__opaque) + stringify!(__val) ) ); } +pub type sigset_t = __sigset_t; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_condattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], +pub struct timeval { + pub tv_sec: __time_t, + pub tv_usec: __suseconds_t, } #[test] -fn bindgen_test_layout__opaque_pthread_condattr_t() { +fn bindgen_test_layout_timeval() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_condattr_t>(), + ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_condattr_t)) + concat!("Size of: ", stringify!(timeval)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_condattr_t>(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t)) + concat!("Alignment of ", stringify!(timeval)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__sig as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), + stringify!(timeval), "::", - stringify!(__sig) + stringify!(tv_sec) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__opaque as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), + stringify!(timeval), "::", - stringify!(__opaque) + stringify!(tv_usec) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_mutex_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 56usize], +pub struct timespec { + pub tv_sec: __time_t, + pub tv_nsec: __syscall_slong_t, } #[test] -fn bindgen_test_layout__opaque_pthread_mutex_t() { +fn bindgen_test_layout_timespec() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutex_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutex_t)) + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(timespec)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutex_t>(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t)) + concat!("Alignment of ", stringify!(timespec)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__sig as *const _ as usize }, + unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), + stringify!(timespec), "::", - stringify!(__sig) + stringify!(tv_sec) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__opaque as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), + stringify!(timespec), "::", - stringify!(__opaque) + stringify!(tv_nsec) ) ); } +pub type suseconds_t = __suseconds_t; +pub type __fd_mask = ::std::os::raw::c_long; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_mutexattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], +pub struct fd_set { + pub __fds_bits: [__fd_mask; 16usize], } #[test] -fn bindgen_test_layout__opaque_pthread_mutexattr_t() { +fn bindgen_test_layout_fd_set() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutexattr_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutexattr_t)) + ::std::mem::size_of::(), + 128usize, + concat!("Size of: ", stringify!(fd_set)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutexattr_t>(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t)) + concat!("Alignment of ", stringify!(fd_set)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__sig as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).__fds_bits as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), + stringify!(fd_set), "::", - stringify!(__opaque) + stringify!(__fds_bits) ) ); } +pub type fd_mask = __fd_mask; +extern "C" { + pub fn select( + __nfds: ::std::os::raw::c_int, + __readfds: *mut fd_set, + __writefds: *mut fd_set, + __exceptfds: *mut fd_set, + __timeout: *mut timeval, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn pselect( + __nfds: ::std::os::raw::c_int, + __readfds: *mut fd_set, + __writefds: *mut fd_set, + __exceptfds: *mut fd_set, + __timeout: *const timespec, + __sigmask: *const __sigset_t, + ) -> ::std::os::raw::c_int; +} +pub type blksize_t = __blksize_t; +pub type blkcnt_t = __blkcnt_t; +pub type fsblkcnt_t = __fsblkcnt_t; +pub type fsfilcnt_t = __fsfilcnt_t; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_once_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], +pub struct __pthread_internal_list { + pub __prev: *mut __pthread_internal_list, + pub __next: *mut __pthread_internal_list, } #[test] -fn bindgen_test_layout__opaque_pthread_once_t() { +fn bindgen_test_layout___pthread_internal_list() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_once_t>(), + ::std::mem::size_of::<__pthread_internal_list>(), 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_once_t)) + concat!("Size of: ", stringify!(__pthread_internal_list)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_once_t>(), + ::std::mem::align_of::<__pthread_internal_list>(), 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_once_t)) + concat!("Alignment of ", stringify!(__pthread_internal_list)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__sig as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_once_t), + stringify!(__pthread_internal_list), "::", - stringify!(__sig) + stringify!(__prev) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__opaque as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_once_t), + stringify!(__pthread_internal_list), "::", - stringify!(__opaque) + stringify!(__next) ) ); } +pub type __pthread_list_t = __pthread_internal_list; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_rwlock_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 192usize], +pub struct __pthread_internal_slist { + pub __next: *mut __pthread_internal_slist, } #[test] -fn bindgen_test_layout__opaque_pthread_rwlock_t() { +fn bindgen_test_layout___pthread_internal_slist() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlock_t>(), - 200usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlock_t)) + ::std::mem::size_of::<__pthread_internal_slist>(), + 8usize, + concat!("Size of: ", stringify!(__pthread_internal_slist)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlock_t>(), + ::std::mem::align_of::<__pthread_internal_slist>(), 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t)) + concat!("Alignment of ", stringify!(__pthread_internal_slist)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__sig as *const _ as usize }, + unsafe { &(*(::std::ptr::null::<__pthread_internal_slist>())).__next as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), + stringify!(__pthread_internal_slist), "::", - stringify!(__opaque) + stringify!(__next) ) ); } +pub type __pthread_slist_t = __pthread_internal_slist; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_rwlockattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 16usize], +pub struct __pthread_mutex_s { + pub __lock: ::std::os::raw::c_int, + pub __count: ::std::os::raw::c_uint, + pub __owner: ::std::os::raw::c_int, + pub __nusers: ::std::os::raw::c_uint, + pub __kind: ::std::os::raw::c_int, + pub __spins: ::std::os::raw::c_short, + pub __elision: ::std::os::raw::c_short, + pub __list: __pthread_list_t, } #[test] -fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { +fn bindgen_test_layout___pthread_mutex_s() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(), - 24usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlockattr_t)) + ::std::mem::size_of::<__pthread_mutex_s>(), + 40usize, + concat!("Size of: ", stringify!(__pthread_mutex_s)) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlockattr_t>(), + ::std::mem::align_of::<__pthread_mutex_s>(), 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t)) + concat!("Alignment of ", stringify!(__pthread_mutex_s)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__sig as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__lock as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), + stringify!(__pthread_mutex_s), "::", - stringify!(__sig) + stringify!(__lock) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__opaque as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__count as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(__pthread_mutex_s), + "::", + stringify!(__count) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__owner as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), + stringify!(__pthread_mutex_s), "::", - stringify!(__opaque) + stringify!(__owner) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_t { - pub __sig: ::std::os::raw::c_long, - pub __cleanup_stack: *mut __darwin_pthread_handler_rec, - pub __opaque: [::std::os::raw::c_char; 8176usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_t() { assert_eq!( - ::std::mem::size_of::<_opaque_pthread_t>(), - 8192usize, - concat!("Size of: ", stringify!(_opaque_pthread_t)) + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__nusers as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(__pthread_mutex_s), + "::", + stringify!(__nusers) + ) ); assert_eq!( - ::std::mem::align_of::<_opaque_pthread_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_t)) + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__kind as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(__pthread_mutex_s), + "::", + stringify!(__kind) + ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__sig as *const _ as usize }, - 0usize, + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__spins as *const _ as usize }, + 20usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_t), + stringify!(__pthread_mutex_s), "::", - stringify!(__sig) + stringify!(__spins) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_t>())).__cleanup_stack as *const _ as usize - }, - 8usize, + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__elision as *const _ as usize }, + 22usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_t), + stringify!(__pthread_mutex_s), "::", - stringify!(__cleanup_stack) + stringify!(__elision) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__opaque as *const _ as usize }, - 16usize, + unsafe { &(*(::std::ptr::null::<__pthread_mutex_s>())).__list as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(_opaque_pthread_t), + stringify!(__pthread_mutex_s), "::", - stringify!(__opaque) + stringify!(__list) ) ); } -pub type __darwin_pthread_attr_t = _opaque_pthread_attr_t; -pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t; -pub type __darwin_pthread_condattr_t = _opaque_pthread_condattr_t; -pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong; -pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; -pub type __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t; -pub type __darwin_pthread_once_t = _opaque_pthread_once_t; -pub type __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t; -pub type __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t; -pub type __darwin_pthread_t = *mut _opaque_pthread_t; -pub type __darwin_nl_item = ::std::os::raw::c_int; -pub type __darwin_wctrans_t = ::std::os::raw::c_int; -pub type __darwin_wctype_t = __uint32_t; -#[repr(u32)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum idtype_t { - P_ALL = 0, - P_PID = 1, - P_PGID = 2, -} -pub type pid_t = __darwin_pid_t; -pub type id_t = __darwin_id_t; -pub type sig_atomic_t = ::std::os::raw::c_int; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulonglong; -pub type register_t = i64; -pub type user_addr_t = u_int64_t; -pub type user_size_t = u_int64_t; -pub type user_ssize_t = i64; -pub type user_long_t = i64; -pub type user_ulong_t = u_int64_t; -pub type user_time_t = i64; -pub type user_off_t = i64; -pub type syscall_arg_t = u_int64_t; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __darwin_i386_thread_state { - pub __eax: ::std::os::raw::c_uint, - pub __ebx: ::std::os::raw::c_uint, - pub __ecx: ::std::os::raw::c_uint, - pub __edx: ::std::os::raw::c_uint, - pub __edi: ::std::os::raw::c_uint, - pub __esi: ::std::os::raw::c_uint, - pub __ebp: ::std::os::raw::c_uint, - pub __esp: ::std::os::raw::c_uint, - pub __ss: ::std::os::raw::c_uint, - pub __eflags: ::std::os::raw::c_uint, - pub __eip: ::std::os::raw::c_uint, - pub __cs: ::std::os::raw::c_uint, - pub __ds: ::std::os::raw::c_uint, - pub __es: ::std::os::raw::c_uint, - pub __fs: ::std::os::raw::c_uint, - pub __gs: ::std::os::raw::c_uint, +pub struct __pthread_rwlock_arch_t { + pub __readers: ::std::os::raw::c_uint, + pub __writers: ::std::os::raw::c_uint, + pub __wrphase_futex: ::std::os::raw::c_uint, + pub __writers_futex: ::std::os::raw::c_uint, + pub __pad3: ::std::os::raw::c_uint, + pub __pad4: ::std::os::raw::c_uint, + pub __cur_writer: ::std::os::raw::c_int, + pub __shared: ::std::os::raw::c_int, + pub __rwelision: ::std::os::raw::c_schar, + pub __pad1: [::std::os::raw::c_uchar; 7usize], + pub __pad2: ::std::os::raw::c_ulong, + pub __flags: ::std::os::raw::c_uint, } #[test] -fn bindgen_test_layout___darwin_i386_thread_state() { +fn bindgen_test_layout___pthread_rwlock_arch_t() { assert_eq!( - ::std::mem::size_of::<__darwin_i386_thread_state>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_i386_thread_state)) + ::std::mem::size_of::<__pthread_rwlock_arch_t>(), + 56usize, + concat!("Size of: ", stringify!(__pthread_rwlock_arch_t)) ); assert_eq!( - ::std::mem::align_of::<__darwin_i386_thread_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_thread_state)) + ::std::mem::align_of::<__pthread_rwlock_arch_t>(), + 8usize, + concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t)) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eax as *const _ as usize + &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__readers as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__eax) + stringify!(__readers) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebx as *const _ as usize + &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers as *const _ as usize }, 4usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__ebx) + stringify!(__writers) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ecx as *const _ as usize + &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__wrphase_futex as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__ecx) + stringify!(__wrphase_futex) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edx as *const _ as usize + &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__writers_futex as *const _ as usize }, 12usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__edx) + stringify!(__writers_futex) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edi as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad3 as *const _ as usize }, 16usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__edi) + stringify!(__pad3) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esi as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad4 as *const _ as usize }, 20usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__esi) + stringify!(__pad4) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebp as *const _ as usize + &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__cur_writer as *const _ as usize }, 24usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__ebp) + stringify!(__cur_writer) ) ); assert_eq!( unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esp as *const _ as usize + &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__shared as *const _ as usize }, 28usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__esp) + stringify!(__shared) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ss as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__rwelision as *const _ as usize + }, 32usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__ss) + stringify!(__rwelision) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eflags as *const _ as usize - }, - 36usize, + unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad1 as *const _ as usize }, + 33usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__eflags) + stringify!(__pad1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eip as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__pad2 as *const _ as usize }, 40usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__eip) + stringify!(__pad2) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__cs as *const _ as usize }, - 44usize, + unsafe { &(*(::std::ptr::null::<__pthread_rwlock_arch_t>())).__flags as *const _ as usize }, + 48usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_rwlock_arch_t), "::", - stringify!(__cs) + stringify!(__flags) ) ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __pthread_cond_s { + pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, + pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, + pub __g_refs: [::std::os::raw::c_uint; 2usize], + pub __g_size: [::std::os::raw::c_uint; 2usize], + pub __g1_orig_size: ::std::os::raw::c_uint, + pub __wrefs: ::std::os::raw::c_uint, + pub __g_signals: [::std::os::raw::c_uint; 2usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_1 { + pub __wseq: ::std::os::raw::c_ulonglong, + pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, +} +#[test] +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ds as *const _ as usize }, - 48usize, + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 8usize, concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ds) + "Size of: ", + stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__es as *const _ as usize }, - 52usize, + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>(), + 4usize, concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__es) + "Alignment of ", + stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__fs as *const _ as usize }, - 56usize, + unsafe { + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__low + as *const _ as usize + }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1), "::", - stringify!(__fs) + stringify!(__low) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__gs as *const _ as usize }, - 60usize, + unsafe { + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1__bindgen_ty_1>())).__high + as *const _ as usize + }, + 4usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_thread_state), + stringify!(__pthread_cond_s__bindgen_ty_1__bindgen_ty_1), "::", - stringify!(__gs) + stringify!(__high) ) ); } -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_fp_control { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} #[test] -fn bindgen_test_layout___darwin_fp_control() { +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::<__darwin_fp_control>(), - 2usize, - concat!("Size of: ", stringify!(__darwin_fp_control)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_fp_control>(), - 2usize, - concat!("Alignment of ", stringify!(__darwin_fp_control)) + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_1>(), + 8usize, + concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_1)) ); -} -impl __darwin_fp_control { - #[inline] - pub fn __invalid(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set___invalid(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn __denorm(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set___denorm(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn __zdiv(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set___zdiv(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn __ovrfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set___ovrfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn __undfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set___undfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn __precis(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set___precis(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn __pc(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) } - } - #[inline] - pub fn set___pc(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 2u8, val as u64) - } - } - #[inline] - pub fn __rc(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u16) } - } - #[inline] - pub fn set___rc(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(10usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __invalid: ::std::os::raw::c_ushort, - __denorm: ::std::os::raw::c_ushort, - __zdiv: ::std::os::raw::c_ushort, - __ovrfl: ::std::os::raw::c_ushort, - __undfl: ::std::os::raw::c_ushort, - __precis: ::std::os::raw::c_ushort, - __pc: ::std::os::raw::c_ushort, - __rc: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let __invalid: u16 = unsafe { ::std::mem::transmute(__invalid) }; - __invalid as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let __denorm: u16 = unsafe { ::std::mem::transmute(__denorm) }; - __denorm as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let __zdiv: u16 = unsafe { ::std::mem::transmute(__zdiv) }; - __zdiv as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let __ovrfl: u16 = unsafe { ::std::mem::transmute(__ovrfl) }; - __ovrfl as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let __undfl: u16 = unsafe { ::std::mem::transmute(__undfl) }; - __undfl as u64 - }); - __bindgen_bitfield_unit.set(5usize, 1u8, { - let __precis: u16 = unsafe { ::std::mem::transmute(__precis) }; - __precis as u64 - }); - __bindgen_bitfield_unit.set(8usize, 2u8, { - let __pc: u16 = unsafe { ::std::mem::transmute(__pc) }; - __pc as u64 - }); - __bindgen_bitfield_unit.set(10usize, 2u8, { - let __rc: u16 = unsafe { ::std::mem::transmute(__rc) }; - __rc as u64 - }); - __bindgen_bitfield_unit - } -} -pub type __darwin_fp_control_t = __darwin_fp_control; -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_fp_status { - pub _bitfield_align_1: [u8; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, -} -#[test] -fn bindgen_test_layout___darwin_fp_status() { assert_eq!( - ::std::mem::size_of::<__darwin_fp_status>(), - 2usize, - concat!("Size of: ", stringify!(__darwin_fp_status)) + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_1>(), + 8usize, + concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_1)) ); assert_eq!( - ::std::mem::align_of::<__darwin_fp_status>(), - 2usize, - concat!("Alignment of ", stringify!(__darwin_fp_status)) - ); -} -impl __darwin_fp_status { - #[inline] - pub fn __invalid(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set___invalid(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn __denorm(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set___denorm(&mut self, val: ::std::os::raw::c_ushort) { unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn __zdiv(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set___zdiv(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn __ovrfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set___ovrfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn __undfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set___undfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn __precis(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set___precis(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn __stkflt(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set___stkflt(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn __errsumm(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set___errsumm(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn __c0(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set___c0(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn __c1(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } - } - #[inline] - pub fn set___c1(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn __c2(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } - } - #[inline] - pub fn set___c2(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn __tos(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 3u8) as u16) } - } - #[inline] - pub fn set___tos(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(11usize, 3u8, val as u64) - } - } - #[inline] - pub fn __c3(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } - } - #[inline] - pub fn set___c3(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn __busy(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set___busy(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __invalid: ::std::os::raw::c_ushort, - __denorm: ::std::os::raw::c_ushort, - __zdiv: ::std::os::raw::c_ushort, - __ovrfl: ::std::os::raw::c_ushort, - __undfl: ::std::os::raw::c_ushort, - __precis: ::std::os::raw::c_ushort, - __stkflt: ::std::os::raw::c_ushort, - __errsumm: ::std::os::raw::c_ushort, - __c0: ::std::os::raw::c_ushort, - __c1: ::std::os::raw::c_ushort, - __c2: ::std::os::raw::c_ushort, - __tos: ::std::os::raw::c_ushort, - __c3: ::std::os::raw::c_ushort, - __busy: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 2usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let __invalid: u16 = unsafe { ::std::mem::transmute(__invalid) }; - __invalid as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let __denorm: u16 = unsafe { ::std::mem::transmute(__denorm) }; - __denorm as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let __zdiv: u16 = unsafe { ::std::mem::transmute(__zdiv) }; - __zdiv as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let __ovrfl: u16 = unsafe { ::std::mem::transmute(__ovrfl) }; - __ovrfl as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let __undfl: u16 = unsafe { ::std::mem::transmute(__undfl) }; - __undfl as u64 - }); - __bindgen_bitfield_unit.set(5usize, 1u8, { - let __precis: u16 = unsafe { ::std::mem::transmute(__precis) }; - __precis as u64 - }); - __bindgen_bitfield_unit.set(6usize, 1u8, { - let __stkflt: u16 = unsafe { ::std::mem::transmute(__stkflt) }; - __stkflt as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let __errsumm: u16 = unsafe { ::std::mem::transmute(__errsumm) }; - __errsumm as u64 - }); - __bindgen_bitfield_unit.set(8usize, 1u8, { - let __c0: u16 = unsafe { ::std::mem::transmute(__c0) }; - __c0 as u64 - }); - __bindgen_bitfield_unit.set(9usize, 1u8, { - let __c1: u16 = unsafe { ::std::mem::transmute(__c1) }; - __c1 as u64 - }); - __bindgen_bitfield_unit.set(10usize, 1u8, { - let __c2: u16 = unsafe { ::std::mem::transmute(__c2) }; - __c2 as u64 - }); - __bindgen_bitfield_unit.set(11usize, 3u8, { - let __tos: u16 = unsafe { ::std::mem::transmute(__tos) }; - __tos as u64 - }); - __bindgen_bitfield_unit.set(14usize, 1u8, { - let __c3: u16 = unsafe { ::std::mem::transmute(__c3) }; - __c3 as u64 - }); - __bindgen_bitfield_unit.set(15usize, 1u8, { - let __busy: u16 = unsafe { ::std::mem::transmute(__busy) }; - __busy as u64 - }); - __bindgen_bitfield_unit - } -} -pub type __darwin_fp_status_t = __darwin_fp_status; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mmst_reg { - pub __mmst_reg: [::std::os::raw::c_char; 10usize], - pub __mmst_rsrv: [::std::os::raw::c_char; 6usize], -} -#[test] -fn bindgen_test_layout___darwin_mmst_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_mmst_reg>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_mmst_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mmst_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_mmst_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_reg as *const _ as usize }, + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq as *const _ as usize + }, 0usize, concat!( "Offset of field: ", - stringify!(__darwin_mmst_reg), + stringify!(__pthread_cond_s__bindgen_ty_1), "::", - stringify!(__mmst_reg) + stringify!(__wseq) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_rsrv as *const _ as usize }, - 10usize, + unsafe { + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_1>())).__wseq32 as *const _ as usize + }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_mmst_reg), + stringify!(__pthread_cond_s__bindgen_ty_1), "::", - stringify!(__mmst_rsrv) + stringify!(__wseq32) ) ); } #[repr(C)] +#[derive(Copy, Clone)] +pub union __pthread_cond_s__bindgen_ty_2 { + pub __g1_start: ::std::os::raw::c_ulonglong, + pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __darwin_xmm_reg { - pub __xmm_reg: [::std::os::raw::c_char; 16usize], +pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { + pub __low: ::std::os::raw::c_uint, + pub __high: ::std::os::raw::c_uint, } #[test] -fn bindgen_test_layout___darwin_xmm_reg() { +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::<__darwin_xmm_reg>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_xmm_reg)) + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 8usize, + concat!( + "Size of: ", + stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1) + ) ); assert_eq!( - ::std::mem::align_of::<__darwin_xmm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_xmm_reg)) + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>(), + 4usize, + concat!( + "Alignment of ", + stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1) + ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_xmm_reg>())).__xmm_reg as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__low + as *const _ as usize + }, 0usize, concat!( "Offset of field: ", - stringify!(__darwin_xmm_reg), + stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1), "::", - stringify!(__xmm_reg) + stringify!(__low) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_ymm_reg { - pub __ymm_reg: [::std::os::raw::c_char; 32usize], -} -#[test] -fn bindgen_test_layout___darwin_ymm_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_ymm_reg>(), - 32usize, - concat!("Size of: ", stringify!(__darwin_ymm_reg)) - ); assert_eq!( - ::std::mem::align_of::<__darwin_ymm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_ymm_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ymm_reg>())).__ymm_reg as *const _ as usize }, - 0usize, + unsafe { + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2__bindgen_ty_1>())).__high + as *const _ as usize + }, + 4usize, concat!( "Offset of field: ", - stringify!(__darwin_ymm_reg), + stringify!(__pthread_cond_s__bindgen_ty_2__bindgen_ty_1), "::", - stringify!(__ymm_reg) + stringify!(__high) ) ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_zmm_reg { - pub __zmm_reg: [::std::os::raw::c_char; 64usize], -} #[test] -fn bindgen_test_layout___darwin_zmm_reg() { +fn bindgen_test_layout___pthread_cond_s__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::<__darwin_zmm_reg>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_zmm_reg)) + ::std::mem::size_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + concat!("Size of: ", stringify!(__pthread_cond_s__bindgen_ty_2)) ); assert_eq!( - ::std::mem::align_of::<__darwin_zmm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_zmm_reg)) + ::std::mem::align_of::<__pthread_cond_s__bindgen_ty_2>(), + 8usize, + concat!("Alignment of ", stringify!(__pthread_cond_s__bindgen_ty_2)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_zmm_reg>())).__zmm_reg as *const _ as usize }, + unsafe { + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start as *const _ + as usize + }, 0usize, concat!( "Offset of field: ", - stringify!(__darwin_zmm_reg), + stringify!(__pthread_cond_s__bindgen_ty_2), "::", - stringify!(__zmm_reg) + stringify!(__g1_start) ) ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_opmask_reg { - pub __opmask_reg: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout___darwin_opmask_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_opmask_reg>(), - 8usize, - concat!("Size of: ", stringify!(__darwin_opmask_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_opmask_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_opmask_reg)) - ); assert_eq!( unsafe { - &(*(::std::ptr::null::<__darwin_opmask_reg>())).__opmask_reg as *const _ as usize + &(*(::std::ptr::null::<__pthread_cond_s__bindgen_ty_2>())).__g1_start32 as *const _ + as usize }, 0usize, concat!( "Offset of field: ", - stringify!(__darwin_opmask_reg), + stringify!(__pthread_cond_s__bindgen_ty_2), "::", - stringify!(__opmask_reg) + stringify!(__g1_start32) ) ); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_i386_float_state { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 224usize], - pub __fpu_reserved1: ::std::os::raw::c_int, -} #[test] -fn bindgen_test_layout___darwin_i386_float_state() { +fn bindgen_test_layout___pthread_cond_s() { assert_eq!( - ::std::mem::size_of::<__darwin_i386_float_state>(), - 524usize, - concat!("Size of: ", stringify!(__darwin_i386_float_state)) + ::std::mem::size_of::<__pthread_cond_s>(), + 48usize, + concat!("Size of: ", stringify!(__pthread_cond_s)) ); assert_eq!( - ::std::mem::align_of::<__darwin_i386_float_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_float_state)) + ::std::mem::align_of::<__pthread_cond_s>(), + 8usize, + concat!("Alignment of ", stringify!(__pthread_cond_s)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved as *const _ - as usize - }, - 0usize, + unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_refs as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(__pthread_cond_s), "::", - stringify!(__fpu_reserved) + stringify!(__g_refs) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, + unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_size as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(__pthread_cond_s), "::", - stringify!(__fpu_fcw) + stringify!(__g_size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, + unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g1_orig_size as *const _ as usize }, + 32usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(__pthread_cond_s), "::", - stringify!(__fpu_fsw) + stringify!(__g1_orig_size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, + unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__wrefs as *const _ as usize }, + 36usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(__pthread_cond_s), "::", - stringify!(__fpu_ftw) + stringify!(__wrefs) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, + unsafe { &(*(::std::ptr::null::<__pthread_cond_s>())).__g_signals as *const _ as usize }, + 40usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(__pthread_cond_s), "::", - stringify!(__fpu_rsrv1) + stringify!(__g_signals) ) ); +} +pub type pthread_t = ::std::os::raw::c_ulong; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_mutexattr_t { + pub __size: [::std::os::raw::c_char; 4usize], + pub __align: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_pthread_mutexattr_t() { assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_fop) - ) + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(pthread_mutexattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ip as *const _ as usize - }, - 16usize, + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(pthread_mutexattr_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_mutexattr_t), "::", - stringify!(__fpu_ip) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_cs as *const _ as usize - }, - 20usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_mutexattr_t), "::", - stringify!(__fpu_cs) + stringify!(__align) ) ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_condattr_t { + pub __size: [::std::os::raw::c_char; 4usize], + pub __align: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_pthread_condattr_t() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(pthread_condattr_t)) + ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(pthread_condattr_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_condattr_t), "::", - stringify!(__fpu_rsrv2) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_dp as *const _ as usize - }, - 24usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_condattr_t), "::", - stringify!(__fpu_dp) + stringify!(__align) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_ds) - ) +} +pub type pthread_key_t = ::std::os::raw::c_uint; +pub type pthread_once_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_attr_t { + pub __size: [::std::os::raw::c_char; 56usize], + pub __align: ::std::os::raw::c_long, +} +#[test] +fn bindgen_test_layout_pthread_attr_t() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(pthread_attr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv3) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pthread_attr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_attr_t), "::", - stringify!(__fpu_mxcsr) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_attr_t), "::", - stringify!(__fpu_mxcsrmask) + stringify!(__align) ) ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_mutex_t { + pub __data: __pthread_mutex_s, + pub __size: [::std::os::raw::c_char; 40usize], + pub __align: ::std::os::raw::c_long, +} +#[test] +fn bindgen_test_layout_pthread_mutex_t() { assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm0 as *const _ as usize - }, + ::std::mem::size_of::(), 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm0) - ) + concat!("Size of: ", stringify!(pthread_mutex_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm1) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pthread_mutex_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, + unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_mutex_t), "::", - stringify!(__fpu_stmm2) + stringify!(__data) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_mutex_t), "::", - stringify!(__fpu_stmm3) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_mutex_t), "::", - stringify!(__fpu_stmm4) + stringify!(__align) ) ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_cond_t { + pub __data: __pthread_cond_s, + pub __size: [::std::os::raw::c_char; 48usize], + pub __align: ::std::os::raw::c_longlong, +} +#[test] +fn bindgen_test_layout_pthread_cond_t() { assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm5) - ) + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(pthread_cond_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm6) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pthread_cond_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, + unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_cond_t), "::", - stringify!(__fpu_stmm7) + stringify!(__data) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_cond_t), "::", - stringify!(__fpu_xmm0) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_cond_t), "::", - stringify!(__fpu_xmm1) + stringify!(__align) ) ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_rwlock_t { + pub __data: __pthread_rwlock_arch_t, + pub __size: [::std::os::raw::c_char; 56usize], + pub __align: ::std::os::raw::c_long, +} +#[test] +fn bindgen_test_layout_pthread_rwlock_t() { assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm2) - ) + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(pthread_rwlock_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm3) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pthread_rwlock_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, + unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_rwlock_t), "::", - stringify!(__fpu_xmm4) + stringify!(__data) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_rwlock_t), "::", - stringify!(__fpu_xmm5) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_rwlock_t), "::", - stringify!(__fpu_xmm6) + stringify!(__align) ) ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_rwlockattr_t { + pub __size: [::std::os::raw::c_char; 8usize], + pub __align: ::std::os::raw::c_long, +} +#[test] +fn bindgen_test_layout_pthread_rwlockattr_t() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(pthread_rwlockattr_t)) + ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm7) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_rwlockattr_t), "::", - stringify!(__fpu_rsrv4) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_float_state), + stringify!(pthread_rwlockattr_t), "::", - stringify!(__fpu_reserved1) + stringify!(__align) ) ); } +pub type pthread_spinlock_t = ::std::os::raw::c_int; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_i386_avx_state { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 224usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, +#[derive(Copy, Clone)] +pub union pthread_barrier_t { + pub __size: [::std::os::raw::c_char; 32usize], + pub __align: ::std::os::raw::c_long, } #[test] -fn bindgen_test_layout___darwin_i386_avx_state() { +fn bindgen_test_layout_pthread_barrier_t() { assert_eq!( - ::std::mem::size_of::<__darwin_i386_avx_state>(), - 716usize, - concat!("Size of: ", stringify!(__darwin_i386_avx_state)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(pthread_barrier_t)) ); assert_eq!( - ::std::mem::align_of::<__darwin_i386_avx_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_avx_state)) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(pthread_barrier_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved as *const _ as usize - }, + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(pthread_barrier_t), "::", - stringify!(__fpu_fcw) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(pthread_barrier_t), "::", - stringify!(__fpu_fsw) + stringify!(__align) ) ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_barrierattr_t { + pub __size: [::std::os::raw::c_char; 4usize], + pub __align: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_pthread_barrierattr_t() { assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ftw) - ) + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(pthread_barrierattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv1) - ) + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(pthread_barrierattr_t)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fop as *const _ as usize - }, - 14usize, + unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(pthread_barrierattr_t), "::", - stringify!(__fpu_fop) + stringify!(__size) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ip as *const _ as usize - }, - 16usize, + unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(pthread_barrierattr_t), "::", - stringify!(__fpu_ip) + stringify!(__align) ) ); +} +extern "C" { + pub fn random() -> ::std::os::raw::c_long; +} +extern "C" { + pub fn srandom(__seed: ::std::os::raw::c_uint); +} +extern "C" { + pub fn initstate( + __seed: ::std::os::raw::c_uint, + __statebuf: *mut ::std::os::raw::c_char, + __statelen: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct random_data { + pub fptr: *mut i32, + pub rptr: *mut i32, + pub state: *mut i32, + pub rand_type: ::std::os::raw::c_int, + pub rand_deg: ::std::os::raw::c_int, + pub rand_sep: ::std::os::raw::c_int, + pub end_ptr: *mut i32, +} +#[test] +fn bindgen_test_layout_random_data() { assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_cs) - ) + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(random_data)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv2) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(random_data)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_dp as *const _ as usize - }, - 24usize, + unsafe { &(*(::std::ptr::null::())).fptr as *const _ as usize }, + 0usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(random_data), "::", - stringify!(__fpu_dp) + stringify!(fptr) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ds as *const _ as usize - }, - 28usize, + unsafe { &(*(::std::ptr::null::())).rptr as *const _ as usize }, + 8usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(random_data), "::", - stringify!(__fpu_ds) + stringify!(rptr) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, + unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, + 16usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(random_data), "::", - stringify!(__fpu_rsrv3) + stringify!(state) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, + unsafe { &(*(::std::ptr::null::())).rand_type as *const _ as usize }, + 24usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(random_data), "::", - stringify!(__fpu_mxcsr) + stringify!(rand_type) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsrmask as *const _ as usize - }, - 36usize, + unsafe { &(*(::std::ptr::null::())).rand_deg as *const _ as usize }, + 28usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(random_data), "::", - stringify!(__fpu_mxcsrmask) + stringify!(rand_deg) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, + unsafe { &(*(::std::ptr::null::())).rand_sep as *const _ as usize }, + 32usize, concat!( "Offset of field: ", - stringify!(__darwin_i386_avx_state), + stringify!(random_data), "::", - stringify!(__fpu_stmm0) + stringify!(rand_sep) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved1 as *const _ as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__avx_reserved1 as *const _ as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh7) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_i386_avx512_state { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 224usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, - pub __fpu_k0: __darwin_opmask_reg, - pub __fpu_k1: __darwin_opmask_reg, - pub __fpu_k2: __darwin_opmask_reg, - pub __fpu_k3: __darwin_opmask_reg, - pub __fpu_k4: __darwin_opmask_reg, - pub __fpu_k5: __darwin_opmask_reg, - pub __fpu_k6: __darwin_opmask_reg, - pub __fpu_k7: __darwin_opmask_reg, - pub __fpu_zmmh0: __darwin_ymm_reg, - pub __fpu_zmmh1: __darwin_ymm_reg, - pub __fpu_zmmh2: __darwin_ymm_reg, - pub __fpu_zmmh3: __darwin_ymm_reg, - pub __fpu_zmmh4: __darwin_ymm_reg, - pub __fpu_zmmh5: __darwin_ymm_reg, - pub __fpu_zmmh6: __darwin_ymm_reg, - pub __fpu_zmmh7: __darwin_ymm_reg, -} -#[test] -fn bindgen_test_layout___darwin_i386_avx512_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_avx512_state>(), - 1036usize, - concat!("Size of: ", stringify!(__darwin_i386_avx512_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_avx512_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_avx512_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k0 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k1 as *const _ as usize - }, - 724usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k2 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k3 as *const _ as usize - }, - 740usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k4 as *const _ as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k5 as *const _ as usize - }, - 756usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k6 as *const _ as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k7 as *const _ as usize - }, - 772usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh0 as *const _ as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh1 as *const _ as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh2 as *const _ as usize - }, - 844usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh3 as *const _ as usize - }, - 876usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh4 as *const _ as usize - }, - 908usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh5 as *const _ as usize - }, - 940usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh6 as *const _ as usize - }, - 972usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh7 as *const _ as usize - }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh7) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_i386_exception_state { - pub __trapno: __uint16_t, - pub __cpu: __uint16_t, - pub __err: __uint32_t, - pub __faultvaddr: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_i386_exception_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_exception_state>(), - 12usize, - concat!("Size of: ", stringify!(__darwin_i386_exception_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_exception_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_exception_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__trapno as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__trapno) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__cpu as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__cpu) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__err as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__err) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__faultvaddr as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__faultvaddr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_debug_state32 { - pub __dr0: ::std::os::raw::c_uint, - pub __dr1: ::std::os::raw::c_uint, - pub __dr2: ::std::os::raw::c_uint, - pub __dr3: ::std::os::raw::c_uint, - pub __dr4: ::std::os::raw::c_uint, - pub __dr5: ::std::os::raw::c_uint, - pub __dr6: ::std::os::raw::c_uint, - pub __dr7: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___darwin_x86_debug_state32() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_debug_state32>(), - 32usize, - concat!("Size of: ", stringify!(__darwin_x86_debug_state32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_debug_state32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_debug_state32)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr0 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr1 as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr2 as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr3 as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr4 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr5 as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr6 as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr7 as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr7) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __x86_instruction_state { - pub __insn_stream_valid_bytes: ::std::os::raw::c_int, - pub __insn_offset: ::std::os::raw::c_int, - pub __out_of_synch: ::std::os::raw::c_int, - pub __insn_bytes: [__uint8_t; 2380usize], - pub __insn_cacheline: [__uint8_t; 64usize], -} -#[test] -fn bindgen_test_layout___x86_instruction_state() { - assert_eq!( - ::std::mem::size_of::<__x86_instruction_state>(), - 2456usize, - concat!("Size of: ", stringify!(__x86_instruction_state)) - ); - assert_eq!( - ::std::mem::align_of::<__x86_instruction_state>(), - 4usize, - concat!("Alignment of ", stringify!(__x86_instruction_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_stream_valid_bytes - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__x86_instruction_state), - "::", - stringify!(__insn_stream_valid_bytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_offset as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__x86_instruction_state), - "::", - stringify!(__insn_offset) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__out_of_synch as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__x86_instruction_state), - "::", - stringify!(__out_of_synch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_bytes as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__x86_instruction_state), - "::", - stringify!(__insn_bytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_instruction_state>())).__insn_cacheline as *const _ - as usize - }, - 2392usize, - concat!( - "Offset of field: ", - stringify!(__x86_instruction_state), - "::", - stringify!(__insn_cacheline) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __last_branch_record { - pub __from_ip: __uint64_t, - pub __to_ip: __uint64_t, - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - pub __bindgen_padding_0: u32, -} -#[test] -fn bindgen_test_layout___last_branch_record() { - assert_eq!( - ::std::mem::size_of::<__last_branch_record>(), - 24usize, - concat!("Size of: ", stringify!(__last_branch_record)) - ); - assert_eq!( - ::std::mem::align_of::<__last_branch_record>(), - 8usize, - concat!("Alignment of ", stringify!(__last_branch_record)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_record>())).__from_ip as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__last_branch_record), - "::", - stringify!(__from_ip) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_record>())).__to_ip as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__last_branch_record), - "::", - stringify!(__to_ip) - ) - ); -} -impl __last_branch_record { - #[inline] - pub fn __mispredict(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set___mispredict(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn __tsx_abort(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set___tsx_abort(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn __in_tsx(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set___in_tsx(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn __cycle_count(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 16u8) as u32) } - } - #[inline] - pub fn set___cycle_count(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 16u8, val as u64) - } - } - #[inline] - pub fn __reserved(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } - } - #[inline] - pub fn set___reserved(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(19usize, 13u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __mispredict: __uint32_t, - __tsx_abort: __uint32_t, - __in_tsx: __uint32_t, - __cycle_count: __uint32_t, - __reserved: __uint32_t, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let __mispredict: u32 = unsafe { ::std::mem::transmute(__mispredict) }; - __mispredict as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let __tsx_abort: u32 = unsafe { ::std::mem::transmute(__tsx_abort) }; - __tsx_abort as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let __in_tsx: u32 = unsafe { ::std::mem::transmute(__in_tsx) }; - __in_tsx as u64 - }); - __bindgen_bitfield_unit.set(3usize, 16u8, { - let __cycle_count: u32 = unsafe { ::std::mem::transmute(__cycle_count) }; - __cycle_count as u64 - }); - __bindgen_bitfield_unit.set(19usize, 13u8, { - let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; - __reserved as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __last_branch_state { - pub __lbr_count: ::std::os::raw::c_int, - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, - pub __lbrs: [__last_branch_record; 32usize], -} -#[test] -fn bindgen_test_layout___last_branch_state() { - assert_eq!( - ::std::mem::size_of::<__last_branch_state>(), - 776usize, - concat!("Size of: ", stringify!(__last_branch_state)) - ); - assert_eq!( - ::std::mem::align_of::<__last_branch_state>(), - 8usize, - concat!("Alignment of ", stringify!(__last_branch_state)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_state>())).__lbr_count as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__last_branch_state), - "::", - stringify!(__lbr_count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__last_branch_state>())).__lbrs as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__last_branch_state), - "::", - stringify!(__lbrs) - ) - ); -} -impl __last_branch_state { - #[inline] - pub fn __lbr_supported_tsx(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set___lbr_supported_tsx(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn __lbr_supported_cycle_count(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set___lbr_supported_cycle_count(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn __reserved(&self) -> __uint32_t { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } - } - #[inline] - pub fn set___reserved(&mut self, val: __uint32_t) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 30u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __lbr_supported_tsx: __uint32_t, - __lbr_supported_cycle_count: __uint32_t, - __reserved: __uint32_t, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let __lbr_supported_tsx: u32 = unsafe { ::std::mem::transmute(__lbr_supported_tsx) }; - __lbr_supported_tsx as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let __lbr_supported_cycle_count: u32 = - unsafe { ::std::mem::transmute(__lbr_supported_cycle_count) }; - __lbr_supported_cycle_count as u64 - }); - __bindgen_bitfield_unit.set(2usize, 30u8, { - let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; - __reserved as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __x86_pagein_state { - pub __pagein_error: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___x86_pagein_state() { - assert_eq!( - ::std::mem::size_of::<__x86_pagein_state>(), - 4usize, - concat!("Size of: ", stringify!(__x86_pagein_state)) - ); - assert_eq!( - ::std::mem::align_of::<__x86_pagein_state>(), - 4usize, - concat!("Alignment of ", stringify!(__x86_pagein_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_pagein_state>())).__pagein_error as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__x86_pagein_state), - "::", - stringify!(__pagein_error) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_thread_state64 { - pub __rax: __uint64_t, - pub __rbx: __uint64_t, - pub __rcx: __uint64_t, - pub __rdx: __uint64_t, - pub __rdi: __uint64_t, - pub __rsi: __uint64_t, - pub __rbp: __uint64_t, - pub __rsp: __uint64_t, - pub __r8: __uint64_t, - pub __r9: __uint64_t, - pub __r10: __uint64_t, - pub __r11: __uint64_t, - pub __r12: __uint64_t, - pub __r13: __uint64_t, - pub __r14: __uint64_t, - pub __r15: __uint64_t, - pub __rip: __uint64_t, - pub __rflags: __uint64_t, - pub __cs: __uint64_t, - pub __fs: __uint64_t, - pub __gs: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_thread_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_thread_state64>(), - 168usize, - concat!("Size of: ", stringify!(__darwin_x86_thread_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_thread_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_thread_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rax as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rax) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbx as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rbx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rcx as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rcx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdx as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rdx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdi as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rdi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsi as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rsi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbp as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rbp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsp as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rsp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r8 as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r9 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r10 as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r11 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r12 as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r13 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r14 as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r15 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rip as *const _ as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rflags as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rflags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__cs as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__fs as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__fs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__gs as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__gs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_thread_full_state64 { - pub __ss64: __darwin_x86_thread_state64, - pub __ds: __uint64_t, - pub __es: __uint64_t, - pub __ss: __uint64_t, - pub __gsbase: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_thread_full_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_thread_full_state64>(), - 200usize, - concat!("Size of: ", stringify!(__darwin_x86_thread_full_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_thread_full_state64>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__darwin_x86_thread_full_state64) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss64 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ss64) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ds as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__es as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__gsbase as *const _ - as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__gsbase) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_float_state64 { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_xmm8: __darwin_xmm_reg, - pub __fpu_xmm9: __darwin_xmm_reg, - pub __fpu_xmm10: __darwin_xmm_reg, - pub __fpu_xmm11: __darwin_xmm_reg, - pub __fpu_xmm12: __darwin_xmm_reg, - pub __fpu_xmm13: __darwin_xmm_reg, - pub __fpu_xmm14: __darwin_xmm_reg, - pub __fpu_xmm15: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], - pub __fpu_reserved1: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___darwin_x86_float_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_float_state64>(), - 524usize, - concat!("Size of: ", stringify!(__darwin_x86_float_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_float_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_float_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_avx_state64 { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_xmm8: __darwin_xmm_reg, - pub __fpu_xmm9: __darwin_xmm_reg, - pub __fpu_xmm10: __darwin_xmm_reg, - pub __fpu_xmm11: __darwin_xmm_reg, - pub __fpu_xmm12: __darwin_xmm_reg, - pub __fpu_xmm13: __darwin_xmm_reg, - pub __fpu_xmm14: __darwin_xmm_reg, - pub __fpu_xmm15: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, - pub __fpu_ymmh8: __darwin_xmm_reg, - pub __fpu_ymmh9: __darwin_xmm_reg, - pub __fpu_ymmh10: __darwin_xmm_reg, - pub __fpu_ymmh11: __darwin_xmm_reg, - pub __fpu_ymmh12: __darwin_xmm_reg, - pub __fpu_ymmh13: __darwin_xmm_reg, - pub __fpu_ymmh14: __darwin_xmm_reg, - pub __fpu_ymmh15: __darwin_xmm_reg, -} -#[test] -fn bindgen_test_layout___darwin_x86_avx_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_avx_state64>(), - 844usize, - concat!("Size of: ", stringify!(__darwin_x86_avx_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_avx_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_avx_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh8 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh9 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh10 as *const _ as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh11 as *const _ as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh12 as *const _ as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh13 as *const _ as usize - }, - 796usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh14 as *const _ as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh15 as *const _ as usize - }, - 828usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh15) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_avx512_state64 { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_xmm8: __darwin_xmm_reg, - pub __fpu_xmm9: __darwin_xmm_reg, - pub __fpu_xmm10: __darwin_xmm_reg, - pub __fpu_xmm11: __darwin_xmm_reg, - pub __fpu_xmm12: __darwin_xmm_reg, - pub __fpu_xmm13: __darwin_xmm_reg, - pub __fpu_xmm14: __darwin_xmm_reg, - pub __fpu_xmm15: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, - pub __fpu_ymmh8: __darwin_xmm_reg, - pub __fpu_ymmh9: __darwin_xmm_reg, - pub __fpu_ymmh10: __darwin_xmm_reg, - pub __fpu_ymmh11: __darwin_xmm_reg, - pub __fpu_ymmh12: __darwin_xmm_reg, - pub __fpu_ymmh13: __darwin_xmm_reg, - pub __fpu_ymmh14: __darwin_xmm_reg, - pub __fpu_ymmh15: __darwin_xmm_reg, - pub __fpu_k0: __darwin_opmask_reg, - pub __fpu_k1: __darwin_opmask_reg, - pub __fpu_k2: __darwin_opmask_reg, - pub __fpu_k3: __darwin_opmask_reg, - pub __fpu_k4: __darwin_opmask_reg, - pub __fpu_k5: __darwin_opmask_reg, - pub __fpu_k6: __darwin_opmask_reg, - pub __fpu_k7: __darwin_opmask_reg, - pub __fpu_zmmh0: __darwin_ymm_reg, - pub __fpu_zmmh1: __darwin_ymm_reg, - pub __fpu_zmmh2: __darwin_ymm_reg, - pub __fpu_zmmh3: __darwin_ymm_reg, - pub __fpu_zmmh4: __darwin_ymm_reg, - pub __fpu_zmmh5: __darwin_ymm_reg, - pub __fpu_zmmh6: __darwin_ymm_reg, - pub __fpu_zmmh7: __darwin_ymm_reg, - pub __fpu_zmmh8: __darwin_ymm_reg, - pub __fpu_zmmh9: __darwin_ymm_reg, - pub __fpu_zmmh10: __darwin_ymm_reg, - pub __fpu_zmmh11: __darwin_ymm_reg, - pub __fpu_zmmh12: __darwin_ymm_reg, - pub __fpu_zmmh13: __darwin_ymm_reg, - pub __fpu_zmmh14: __darwin_ymm_reg, - pub __fpu_zmmh15: __darwin_ymm_reg, - pub __fpu_zmm16: __darwin_zmm_reg, - pub __fpu_zmm17: __darwin_zmm_reg, - pub __fpu_zmm18: __darwin_zmm_reg, - pub __fpu_zmm19: __darwin_zmm_reg, - pub __fpu_zmm20: __darwin_zmm_reg, - pub __fpu_zmm21: __darwin_zmm_reg, - pub __fpu_zmm22: __darwin_zmm_reg, - pub __fpu_zmm23: __darwin_zmm_reg, - pub __fpu_zmm24: __darwin_zmm_reg, - pub __fpu_zmm25: __darwin_zmm_reg, - pub __fpu_zmm26: __darwin_zmm_reg, - pub __fpu_zmm27: __darwin_zmm_reg, - pub __fpu_zmm28: __darwin_zmm_reg, - pub __fpu_zmm29: __darwin_zmm_reg, - pub __fpu_zmm30: __darwin_zmm_reg, - pub __fpu_zmm31: __darwin_zmm_reg, -} -#[test] -fn bindgen_test_layout___darwin_x86_avx512_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_avx512_state64>(), - 2444usize, - concat!("Size of: ", stringify!(__darwin_x86_avx512_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_avx512_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_avx512_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh8 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh9 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh10 as *const _ - as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh11 as *const _ - as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh12 as *const _ - as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh13 as *const _ - as usize - }, - 796usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh14 as *const _ - as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh15 as *const _ - as usize - }, - 828usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k0 as *const _ as usize - }, - 844usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k1 as *const _ as usize - }, - 852usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k2 as *const _ as usize - }, - 860usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k3 as *const _ as usize - }, - 868usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k4 as *const _ as usize - }, - 876usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k5 as *const _ as usize - }, - 884usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k6 as *const _ as usize - }, - 892usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k7 as *const _ as usize - }, - 900usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh0 as *const _ as usize - }, - 908usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh1 as *const _ as usize - }, - 940usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh2 as *const _ as usize - }, - 972usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh3 as *const _ as usize - }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh4 as *const _ as usize - }, - 1036usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh5 as *const _ as usize - }, - 1068usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh6 as *const _ as usize - }, - 1100usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh7 as *const _ as usize - }, - 1132usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh8 as *const _ as usize - }, - 1164usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh9 as *const _ as usize - }, - 1196usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh10 as *const _ - as usize - }, - 1228usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh11 as *const _ - as usize - }, - 1260usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh12 as *const _ - as usize - }, - 1292usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh13 as *const _ - as usize - }, - 1324usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh14 as *const _ - as usize - }, - 1356usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh15 as *const _ - as usize - }, - 1388usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm16 as *const _ as usize - }, - 1420usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm16) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm17 as *const _ as usize - }, - 1484usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm17) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm18 as *const _ as usize - }, - 1548usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm18) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm19 as *const _ as usize - }, - 1612usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm19) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm20 as *const _ as usize - }, - 1676usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm20) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm21 as *const _ as usize - }, - 1740usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm21) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm22 as *const _ as usize - }, - 1804usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm22) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm23 as *const _ as usize - }, - 1868usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm23) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm24 as *const _ as usize - }, - 1932usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm24) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm25 as *const _ as usize - }, - 1996usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm25) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm26 as *const _ as usize - }, - 2060usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm26) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm27 as *const _ as usize - }, - 2124usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm27) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm28 as *const _ as usize - }, - 2188usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm28) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm29 as *const _ as usize - }, - 2252usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm29) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm30 as *const _ as usize - }, - 2316usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm30) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm31 as *const _ as usize - }, - 2380usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm31) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_exception_state64 { - pub __trapno: __uint16_t, - pub __cpu: __uint16_t, - pub __err: __uint32_t, - pub __faultvaddr: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_exception_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_exception_state64>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_x86_exception_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_exception_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_exception_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__trapno as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__trapno) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__cpu as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__cpu) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__err as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__err) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__faultvaddr as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__faultvaddr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_debug_state64 { - pub __dr0: __uint64_t, - pub __dr1: __uint64_t, - pub __dr2: __uint64_t, - pub __dr3: __uint64_t, - pub __dr4: __uint64_t, - pub __dr5: __uint64_t, - pub __dr6: __uint64_t, - pub __dr7: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_debug_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_debug_state64>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_x86_debug_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_debug_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_debug_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr0 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr1 as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr2 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr3 as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr4 as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr5 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr6 as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr7 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr7) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_cpmu_state64 { - pub __ctrs: [__uint64_t; 16usize], -} -#[test] -fn bindgen_test_layout___darwin_x86_cpmu_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_cpmu_state64>(), - 128usize, - concat!("Size of: ", stringify!(__darwin_x86_cpmu_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_cpmu_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_cpmu_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_cpmu_state64>())).__ctrs as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_cpmu_state64), - "::", - stringify!(__ctrs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext32 { - pub __es: __darwin_i386_exception_state, - pub __ss: __darwin_i386_thread_state, - pub __fs: __darwin_i386_float_state, -} -#[test] -fn bindgen_test_layout___darwin_mcontext32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext32>(), - 600usize, - concat!("Size of: ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__ss as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__fs as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext_avx32 { - pub __es: __darwin_i386_exception_state, - pub __ss: __darwin_i386_thread_state, - pub __fs: __darwin_i386_avx_state, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx32>(), - 792usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx32)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__ss as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__fs as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext_avx512_32 { - pub __es: __darwin_i386_exception_state, - pub __ss: __darwin_i386_thread_state, - pub __fs: __darwin_i386_avx512_state, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_32>(), - 1112usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_32)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__ss as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__fs as *const _ as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext64 { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_state64, - pub __fs: __darwin_x86_float_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext64>(), - 712usize, - concat!("Size of: ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__fs as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext64_full { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_full_state64, - pub __fs: __darwin_x86_float_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext64_full>(), - 744usize, - concat!("Size of: ", stringify!(__darwin_mcontext64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext64_full>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext64_full)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__fs as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext_avx64 { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_state64, - pub __fs: __darwin_x86_avx_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx64>(), - 1032usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx64)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__fs as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext_avx64_full { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_full_state64, - pub __fs: __darwin_x86_avx_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx64_full>(), - 1064usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx64_full>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx64_full)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__fs as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext_avx512_64 { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_state64, - pub __fs: __darwin_x86_avx512_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_64>(), - 2632usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__fs as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mcontext_avx512_64_full { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_full_state64, - pub __fs: __darwin_x86_avx512_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_64_full>(), - 2664usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_64_full>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__darwin_mcontext_avx512_64_full) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__fs as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__fs) - ) - ); -} -pub type mcontext_t = *mut __darwin_mcontext64; -pub type pthread_attr_t = __darwin_pthread_attr_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_sigaltstack { - pub ss_sp: *mut ::std::os::raw::c_void, - pub ss_size: __darwin_size_t, - pub ss_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___darwin_sigaltstack() { - assert_eq!( - ::std::mem::size_of::<__darwin_sigaltstack>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_sigaltstack>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_sp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_flags) - ) - ); -} -pub type stack_t = __darwin_sigaltstack; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_ucontext { - pub uc_onstack: ::std::os::raw::c_int, - pub uc_sigmask: __darwin_sigset_t, - pub uc_stack: __darwin_sigaltstack, - pub uc_link: *mut __darwin_ucontext, - pub uc_mcsize: __darwin_size_t, - pub uc_mcontext: *mut __darwin_mcontext64, -} -#[test] -fn bindgen_test_layout___darwin_ucontext() { - assert_eq!( - ::std::mem::size_of::<__darwin_ucontext>(), - 56usize, - concat!("Size of: ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_ucontext>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_onstack as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_onstack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_sigmask as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_stack as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_link as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcsize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcontext as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcontext) - ) - ); -} -pub type ucontext_t = __darwin_ucontext; -pub type sigset_t = __darwin_sigset_t; -pub type uid_t = __darwin_uid_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub union sigval { - pub sival_int: ::std::os::raw::c_int, - pub sival_ptr: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_sigval() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_int as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigevent { - pub sigev_notify: ::std::os::raw::c_int, - pub sigev_signo: ::std::os::raw::c_int, - pub sigev_value: sigval, - pub sigev_notify_function: ::std::option::Option, - pub sigev_notify_attributes: *mut pthread_attr_t, -} -#[test] -fn bindgen_test_layout_sigevent() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_signo as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_value as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify_function as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_function) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sigev_notify_attributes as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_attributes) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __siginfo { - pub si_signo: ::std::os::raw::c_int, - pub si_errno: ::std::os::raw::c_int, - pub si_code: ::std::os::raw::c_int, - pub si_pid: pid_t, - pub si_uid: uid_t, - pub si_status: ::std::os::raw::c_int, - pub si_addr: *mut ::std::os::raw::c_void, - pub si_value: sigval, - pub si_band: ::std::os::raw::c_long, - pub __pad: [::std::os::raw::c_ulong; 7usize], -} -#[test] -fn bindgen_test_layout___siginfo() { - assert_eq!( - ::std::mem::size_of::<__siginfo>(), - 104usize, - concat!("Size of: ", stringify!(__siginfo)) - ); - assert_eq!( - ::std::mem::align_of::<__siginfo>(), - 8usize, - concat!("Alignment of ", stringify!(__siginfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_signo as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_errno as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_code as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_pid as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_pid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_uid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_uid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_status as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_addr as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_addr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_value as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_band as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_band) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).__pad as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(__pad) - ) - ); -} -pub type siginfo_t = __siginfo; -#[repr(C)] -#[derive(Copy, Clone)] -pub union __sigaction_u { - pub __sa_handler: ::std::option::Option, - pub __sa_sigaction: ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_int, - arg2: *mut __siginfo, - arg3: *mut ::std::os::raw::c_void, - ), - >, -} -#[test] -fn bindgen_test_layout___sigaction_u() { - assert_eq!( - ::std::mem::size_of::<__sigaction_u>(), - 8usize, - concat!("Size of: ", stringify!(__sigaction_u)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction_u>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction_u)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_handler as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_handler) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_sigaction as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_sigaction) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __sigaction { - pub __sigaction_u: __sigaction_u, - pub sa_tramp: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut siginfo_t, - arg5: *mut ::std::os::raw::c_void, - ), - >, - pub sa_mask: sigset_t, - pub sa_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___sigaction() { - assert_eq!( - ::std::mem::size_of::<__sigaction>(), - 24usize, - concat!("Size of: ", stringify!(__sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).__sigaction_u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_tramp as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_tramp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_mask as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_flags as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_flags) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigaction { - pub __sigaction_u: __sigaction_u, - pub sa_mask: sigset_t, - pub sa_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigaction() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__sigaction_u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_mask as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_flags as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); -} -pub type sig_t = ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigvec { - pub sv_handler: ::std::option::Option, - pub sv_mask: ::std::os::raw::c_int, - pub sv_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigvec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigvec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigvec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_handler as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_handler) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_mask as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_flags as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_flags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigstack { - pub ss_sp: *mut ::std::os::raw::c_char, - pub ss_onstack: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigstack() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigstack)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_sp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_onstack as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_onstack) - ) - ); -} -extern "C" { - pub fn signal( - arg1: ::std::os::raw::c_int, - arg2: ::std::option::Option, - ) -> ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_int, - arg2: ::std::option::Option, - ), - >; -} -pub type int_least8_t = i8; -pub type int_least16_t = i16; -pub type int_least32_t = i32; -pub type int_least64_t = i64; -pub type uint_least8_t = u8; -pub type uint_least16_t = u16; -pub type uint_least32_t = u32; -pub type uint_least64_t = u64; -pub type int_fast8_t = i8; -pub type int_fast16_t = i16; -pub type int_fast32_t = i32; -pub type int_fast64_t = i64; -pub type uint_fast8_t = u8; -pub type uint_fast16_t = u16; -pub type uint_fast32_t = u32; -pub type uint_fast64_t = u64; -pub type intmax_t = ::std::os::raw::c_long; -pub type uintmax_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __darwin_time_t, - pub tv_usec: __darwin_suseconds_t, -} -#[test] -fn bindgen_test_layout_timeval() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} -pub type rlim_t = __uint64_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage { - pub ru_utime: timeval, - pub ru_stime: timeval, - pub ru_maxrss: ::std::os::raw::c_long, - pub ru_ixrss: ::std::os::raw::c_long, - pub ru_idrss: ::std::os::raw::c_long, - pub ru_isrss: ::std::os::raw::c_long, - pub ru_minflt: ::std::os::raw::c_long, - pub ru_majflt: ::std::os::raw::c_long, - pub ru_nswap: ::std::os::raw::c_long, - pub ru_inblock: ::std::os::raw::c_long, - pub ru_oublock: ::std::os::raw::c_long, - pub ru_msgsnd: ::std::os::raw::c_long, - pub ru_msgrcv: ::std::os::raw::c_long, - pub ru_nsignals: ::std::os::raw::c_long, - pub ru_nvcsw: ::std::os::raw::c_long, - pub ru_nivcsw: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_rusage() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_utime as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_utime) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_stime as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_stime) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_maxrss as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_maxrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_ixrss as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_ixrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_idrss as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_idrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_isrss as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_isrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_minflt as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_minflt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_majflt as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_majflt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nswap as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nswap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_inblock as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_inblock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_oublock as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_oublock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgsnd as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgsnd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgrcv as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgrcv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nsignals as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nsignals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nvcsw as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nvcsw) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nivcsw as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nivcsw) - ) - ); -} -pub type rusage_info_t = *mut ::std::os::raw::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v0 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v0() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(rusage_info_v0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v0)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v1 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v1() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage_info_v1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v2 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v2() { - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(rusage_info_v2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v3 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v3() { - assert_eq!( - ::std::mem::size_of::(), - 232usize, - concat!("Size of: ", stringify!(rusage_info_v3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_serviced_system_time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v4 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, - pub ri_logical_writes: u64, - pub ri_lifetime_max_phys_footprint: u64, - pub ri_instructions: u64, - pub ri_cycles: u64, - pub ri_billed_energy: u64, - pub ri_serviced_energy: u64, - pub ri_interval_max_phys_footprint: u64, - pub ri_runnable_time: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v4() { - assert_eq!( - ::std::mem::size_of::(), - 296usize, - concat!("Size of: ", stringify!(rusage_info_v4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_logical_writes as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_logical_writes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_lifetime_max_phys_footprint as *const _ - as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_lifetime_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_instructions as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_instructions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_cycles as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cycles) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_billed_energy as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_energy as *const _ as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interval_max_phys_footprint as *const _ - as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interval_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_runnable_time as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_runnable_time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v5 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, - pub ri_logical_writes: u64, - pub ri_lifetime_max_phys_footprint: u64, - pub ri_instructions: u64, - pub ri_cycles: u64, - pub ri_billed_energy: u64, - pub ri_serviced_energy: u64, - pub ri_interval_max_phys_footprint: u64, - pub ri_runnable_time: u64, - pub ri_flags: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v5() { - assert_eq!( - ::std::mem::size_of::(), - 304usize, - concat!("Size of: ", stringify!(rusage_info_v5)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v5)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_serviced_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_logical_writes as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_logical_writes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_lifetime_max_phys_footprint as *const _ - as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_lifetime_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_instructions as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_instructions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_cycles as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_cycles) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_billed_energy as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_billed_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_energy as *const _ as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_serviced_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interval_max_phys_footprint as *const _ - as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_interval_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_runnable_time as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_runnable_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_flags as *const _ as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v5), - "::", - stringify!(ri_flags) - ) - ); -} -pub type rusage_info_current = rusage_info_v5; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rlimit { - pub rlim_cur: rlim_t, - pub rlim_max: rlim_t, -} -#[test] -fn bindgen_test_layout_rlimit() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(rlimit)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rlimit)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_cur as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_cur) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_max as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_max) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct proc_rlimit_control_wakeupmon { - pub wm_flags: u32, - pub wm_rate: i32, -} -#[test] -fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_rate as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_rate) - ) - ); -} -extern "C" { - pub fn getpriority(arg1: ::std::os::raw::c_int, arg2: id_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getiopolicy_np( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrlimit(arg1: ::std::os::raw::c_int, arg2: *mut rlimit) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrusage(arg1: ::std::os::raw::c_int, arg2: *mut rusage) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setpriority( - arg1: ::std::os::raw::c_int, - arg2: id_t, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setiopolicy_np( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setrlimit(arg1: ::std::os::raw::c_int, arg2: *const rlimit) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union wait { - pub w_status: ::std::os::raw::c_int, - pub w_T: wait__bindgen_ty_1, - pub w_S: wait__bindgen_ty_2, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_1 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_1)) - ); -} -impl wait__bindgen_ty_1 { - #[inline] - pub fn w_Termsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set_w_Termsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn w_Coredump(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_w_Coredump(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn w_Retcode(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Retcode(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Filler(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Termsig: ::std::os::raw::c_uint, - w_Coredump: ::std::os::raw::c_uint, - w_Retcode: ::std::os::raw::c_uint, - w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 7u8, { - let w_Termsig: u32 = unsafe { ::std::mem::transmute(w_Termsig) }; - w_Termsig as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let w_Coredump: u32 = unsafe { ::std::mem::transmute(w_Coredump) }; - w_Coredump as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Retcode: u32 = unsafe { ::std::mem::transmute(w_Retcode) }; - w_Retcode as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) }; - w_Filler as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_2 { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_2)) - ); -} -impl wait__bindgen_ty_2 { - #[inline] - pub fn w_Stopval(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Stopval(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Stopsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Stopsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Filler(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Stopval: ::std::os::raw::c_uint, - w_Stopsig: ::std::os::raw::c_uint, - w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 8u8, { - let w_Stopval: u32 = unsafe { ::std::mem::transmute(w_Stopval) }; - w_Stopval as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Stopsig: u32 = unsafe { ::std::mem::transmute(w_Stopsig) }; - w_Stopsig as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) }; - w_Filler as u64 - }); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout_wait() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_status as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(w_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_T as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_T)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_S as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_S)) - ); -} -extern "C" { - pub fn wait(arg1: *mut ::std::os::raw::c_int) -> pid_t; -} -extern "C" { - pub fn waitpid( - arg1: pid_t, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> pid_t; -} -extern "C" { - pub fn waitid( - arg1: idtype_t, - arg2: id_t, - arg3: *mut siginfo_t, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait3( - arg1: *mut ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut rusage, - ) -> pid_t; -} -extern "C" { - pub fn wait4( - arg1: pid_t, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut rusage, - ) -> pid_t; -} -extern "C" { - pub fn alloca(arg1: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -pub type ct_rune_t = __darwin_ct_rune_t; -pub type rune_t = __darwin_rune_t; -pub type wchar_t = __darwin_wchar_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct div_t { - pub quot: ::std::os::raw::c_int, - pub rem: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_div_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ldiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_ldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lldiv_t { - pub quot: ::std::os::raw::c_longlong, - pub rem: ::std::os::raw::c_longlong, -} -#[test] -fn bindgen_test_layout_lldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { - pub static mut __mb_cur_max: ::std::os::raw::c_int; -} -extern "C" { - pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn calloc( - __count: ::std::os::raw::c_ulong, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn free(arg1: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn realloc( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn valloc(arg1: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn aligned_alloc(__alignment: usize, __size: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn posix_memalign( - __memptr: *mut *mut ::std::os::raw::c_void, - __alignment: usize, - __size: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn abort(); -} -extern "C" { - pub fn abs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atexit(arg1: ::std::option::Option) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atof(arg1: *const ::std::os::raw::c_char) -> f64; -} -extern "C" { - pub fn atoi(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atol(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn atoll(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn bsearch( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn div(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> div_t; -} -extern "C" { - pub fn exit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn getenv(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn labs(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn ldiv(arg1: ::std::os::raw::c_long, arg2: ::std::os::raw::c_long) -> ldiv_t; -} -extern "C" { - pub fn llabs(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn lldiv(arg1: ::std::os::raw::c_longlong, arg2: ::std::os::raw::c_longlong) -> lldiv_t; -} -extern "C" { - pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbstowcs(arg1: *mut wchar_t, arg2: *const ::std::os::raw::c_char, arg3: usize) -> usize; -} -extern "C" { - pub fn mbtowc( - arg1: *mut wchar_t, - arg2: *const ::std::os::raw::c_char, - arg3: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn qsort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, + assert_eq!( + unsafe { &(*(::std::ptr::null::())).end_ptr as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(random_data), + "::", + stringify!(end_ptr) + ) ); } extern "C" { - pub fn rand() -> ::std::os::raw::c_int; + pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int; } extern "C" { - pub fn srand(arg1: ::std::os::raw::c_uint); + pub fn srandom_r( + __seed: ::std::os::raw::c_uint, + __buf: *mut random_data, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn strtod( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> f64; + pub fn initstate_r( + __seed: ::std::os::raw::c_uint, + __statebuf: *mut ::std::os::raw::c_char, + __statelen: usize, + __buf: *mut random_data, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn strtof( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> f32; + pub fn setstate_r( + __statebuf: *mut ::std::os::raw::c_char, + __buf: *mut random_data, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn strtol( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; + pub fn rand() -> ::std::os::raw::c_int; } extern "C" { - pub fn strtold( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> u128; + pub fn srand(__seed: ::std::os::raw::c_uint); } extern "C" { - pub fn strtoll( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; + pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; } extern "C" { - pub fn strtoul( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulong; + pub fn drand48() -> f64; } extern "C" { - pub fn strtoull( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; + pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64; } extern "C" { - pub fn system(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn lrand48() -> ::std::os::raw::c_long; } extern "C" { - pub fn wcstombs(arg1: *mut ::std::os::raw::c_char, arg2: *const wchar_t, arg3: usize) -> usize; + pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } extern "C" { - pub fn wctomb(arg1: *mut ::std::os::raw::c_char, arg2: wchar_t) -> ::std::os::raw::c_int; + pub fn mrand48() -> ::std::os::raw::c_long; } extern "C" { - pub fn _Exit(arg1: ::std::os::raw::c_int); + pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } extern "C" { - pub fn a64l(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; + pub fn srand48(__seedval: ::std::os::raw::c_long); } extern "C" { - pub fn drand48() -> f64; + pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; } extern "C" { - pub fn ecvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; + pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); } -extern "C" { - pub fn erand48(arg1: *mut ::std::os::raw::c_ushort) -> f64; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct drand48_data { + pub __x: [::std::os::raw::c_ushort; 3usize], + pub __old_x: [::std::os::raw::c_ushort; 3usize], + pub __c: ::std::os::raw::c_ushort, + pub __init: ::std::os::raw::c_ushort, + pub __a: ::std::os::raw::c_ulonglong, +} +#[test] +fn bindgen_test_layout_drand48_data() { + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(drand48_data)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(drand48_data)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__x as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(drand48_data), + "::", + stringify!(__x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__old_x as *const _ as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(drand48_data), + "::", + stringify!(__old_x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__c as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(drand48_data), + "::", + stringify!(__c) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__init as *const _ as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(drand48_data), + "::", + stringify!(__init) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::())).__a as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(drand48_data), + "::", + stringify!(__a) + ) + ); } extern "C" { - pub fn fcvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; + pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; } extern "C" { - pub fn gcvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; + pub fn erand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut f64, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn getsubopt( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *const *mut ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, + pub fn lrand48_r( + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn grantpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn nrand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn initstate( - arg1: ::std::os::raw::c_uint, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> *mut ::std::os::raw::c_char; + pub fn mrand48_r( + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn jrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; + pub fn jrand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn l64a(arg1: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; + pub fn srand48_r( + __seedval: ::std::os::raw::c_long, + __buffer: *mut drand48_data, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn lcong48(arg1: *mut ::std::os::raw::c_ushort); + pub fn seed48_r( + __seed16v: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn lrand48() -> ::std::os::raw::c_long; + pub fn lcong48_r( + __param: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn mktemp(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; + pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn mkstemp(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn calloc( + __nmemb: ::std::os::raw::c_ulong, + __size: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn mrand48() -> ::std::os::raw::c_long; + pub fn realloc( + __ptr: *mut ::std::os::raw::c_void, + __size: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn nrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; + pub fn reallocarray( + __ptr: *mut ::std::os::raw::c_void, + __nmemb: usize, + __size: usize, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn posix_openpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn free(__ptr: *mut ::std::os::raw::c_void); } extern "C" { - pub fn ptsname(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; + pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn ptsname_r( - fildes: ::std::os::raw::c_int, - buffer: *mut ::std::os::raw::c_char, - buflen: usize, - ) -> ::std::os::raw::c_int; + pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn putenv(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn posix_memalign( + __memptr: *mut *mut ::std::os::raw::c_void, + __alignment: usize, + __size: usize, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn random() -> ::std::os::raw::c_long; + pub fn aligned_alloc(__alignment: usize, __size: usize) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn rand_r(arg1: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; + pub fn abort(); } extern "C" { - #[link_name = "\u{1}_realpath$DARWIN_EXTSN"] - pub fn realpath( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; + pub fn atexit(__func: ::std::option::Option) -> ::std::os::raw::c_int; } extern "C" { - pub fn seed48(arg1: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; + pub fn at_quick_exit( + __func: ::std::option::Option, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn setenv( - __name: *const ::std::os::raw::c_char, - __value: *const ::std::os::raw::c_char, - __overwrite: ::std::os::raw::c_int, + pub fn on_exit( + __func: ::std::option::Option< + unsafe extern "C" fn( + __status: ::std::os::raw::c_int, + __arg: *mut ::std::os::raw::c_void, + ), + >, + __arg: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn setkey(arg1: *const ::std::os::raw::c_char); + pub fn exit(__status: ::std::os::raw::c_int); } extern "C" { - pub fn setstate(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; + pub fn quick_exit(__status: ::std::os::raw::c_int); } extern "C" { - pub fn srand48(arg1: ::std::os::raw::c_long); + pub fn _Exit(__status: ::std::os::raw::c_int); } extern "C" { - pub fn srandom(arg1: ::std::os::raw::c_uint); + pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn unlockpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { - pub fn unsetenv(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn setenv( + __name: *const ::std::os::raw::c_char, + __value: *const ::std::os::raw::c_char, + __replace: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } -pub type dev_t = __darwin_dev_t; -pub type mode_t = __darwin_mode_t; extern "C" { - pub fn arc4random() -> u32; + pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { - pub fn arc4random_addrandom(arg1: *mut ::std::os::raw::c_uchar, arg2: ::std::os::raw::c_int); + pub fn clearenv() -> ::std::os::raw::c_int; } extern "C" { - pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __nbytes: usize); + pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn arc4random_stir(); + pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { - pub fn arc4random_uniform(__upper_bound: u32) -> u32; + pub fn mkstemps( + __template: *mut ::std::os::raw::c_char, + __suffixlen: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn cgetcap( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; + pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn cgetclose() -> ::std::os::raw::c_int; + pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { - pub fn cgetent( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; + pub fn realpath( + __name: *const ::std::os::raw::c_char, + __resolved: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } +pub type __compar_fn_t = ::std::option::Option< + unsafe extern "C" fn( + arg1: *const ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; extern "C" { - pub fn cgetfirst( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; + pub fn bsearch( + __key: *const ::std::os::raw::c_void, + __base: *const ::std::os::raw::c_void, + __nmemb: usize, + __size: usize, + __compar: __compar_fn_t, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn cgetmatch( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; + pub fn qsort( + __base: *mut ::std::os::raw::c_void, + __nmemb: usize, + __size: usize, + __compar: __compar_fn_t, + ); } extern "C" { - pub fn cgetnext( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; + pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { - pub fn cgetnum( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; + pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long; } extern "C" { - pub fn cgetset(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; } extern "C" { - pub fn cgetstr( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; + pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t; } extern "C" { - pub fn cgetustr( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; + pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t; } extern "C" { - #[link_name = "\u{1}_daemon$1050"] - pub fn daemon( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; + pub fn lldiv( + __numer: ::std::os::raw::c_longlong, + __denom: ::std::os::raw::c_longlong, + ) -> lldiv_t; } extern "C" { - pub fn devname(arg1: dev_t, arg2: mode_t) -> *mut ::std::os::raw::c_char; + pub fn ecvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn devname_r( - arg1: dev_t, - arg2: mode_t, - buf: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, + pub fn fcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn getbsize( - arg1: *mut ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_long, + pub fn gcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn getloadavg(arg1: *mut f64, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn qecvt( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn getprogname() -> *const ::std::os::raw::c_char; + pub fn qfcvt( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn setprogname(arg1: *const ::std::os::raw::c_char); + pub fn qgcvt( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn heapsort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, + pub fn ecvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn mergesort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, + pub fn fcvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn psort( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); + pub fn qecvt_r( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn psort_r( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - arg1: *mut ::std::os::raw::c_void, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); + pub fn qfcvt_r( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn qsort_r( - __base: *mut ::std::os::raw::c_void, - __nel: usize, - __width: usize, - arg1: *mut ::std::os::raw::c_void, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); + pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int; } extern "C" { - pub fn radixsort( - __base: *mut *const ::std::os::raw::c_uchar, - __nel: ::std::os::raw::c_int, - __table: *const ::std::os::raw::c_uchar, - __endbyte: ::std::os::raw::c_uint, + pub fn mbtowc( + __pwc: *mut wchar_t, + __s: *const ::std::os::raw::c_char, + __n: usize, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn rpmatch(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; + pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int; } extern "C" { - pub fn sradixsort( - __base: *mut *const ::std::os::raw::c_uchar, - __nel: ::std::os::raw::c_int, - __table: *const ::std::os::raw::c_uchar, - __endbyte: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; + pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize; } extern "C" { - pub fn sranddev(); + pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize; } extern "C" { - pub fn srandomdev(); + pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { - pub fn reallocf( - __ptr: *mut ::std::os::raw::c_void, - __size: usize, - ) -> *mut ::std::os::raw::c_void; + pub fn getsubopt( + __optionp: *mut *mut ::std::os::raw::c_char, + __tokens: *const *mut ::std::os::raw::c_char, + __valuep: *mut *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn strtonum( - __numstr: *const ::std::os::raw::c_char, - __minval: ::std::os::raw::c_longlong, - __maxval: ::std::os::raw::c_longlong, - __errstrp: *mut *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_longlong; -} + pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int) + -> ::std::os::raw::c_int; +} +pub type int_least8_t = __int_least8_t; +pub type int_least16_t = __int_least16_t; +pub type int_least32_t = __int_least32_t; +pub type int_least64_t = __int_least64_t; +pub type uint_least8_t = __uint_least8_t; +pub type uint_least16_t = __uint_least16_t; +pub type uint_least32_t = __uint_least32_t; +pub type uint_least64_t = __uint_least64_t; +pub type int_fast8_t = ::std::os::raw::c_schar; +pub type int_fast16_t = ::std::os::raw::c_long; +pub type int_fast32_t = ::std::os::raw::c_long; +pub type int_fast64_t = ::std::os::raw::c_long; +pub type uint_fast8_t = ::std::os::raw::c_uchar; +pub type uint_fast16_t = ::std::os::raw::c_ulong; +pub type uint_fast32_t = ::std::os::raw::c_ulong; +pub type uint_fast64_t = ::std::os::raw::c_ulong; +pub type intmax_t = __intmax_t; +pub type uintmax_t = __uintmax_t; extern "C" { - pub fn strtoq( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; + pub fn memcpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn strtouq( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; + pub fn memmove( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub static mut suboptarg: *mut ::std::os::raw::c_char; + pub fn memccpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __c: ::std::os::raw::c_int, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn memchr( - __s: *const ::std::os::raw::c_void, + pub fn memset( + __s: *mut ::std::os::raw::c_void, __c: ::std::os::raw::c_int, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; @@ -11704,42 +2281,49 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn memcpy( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, + pub fn memchr( + __s: *const ::std::os::raw::c_void, + __c: ::std::os::raw::c_int, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } extern "C" { - pub fn memmove( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __len: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; + pub fn strcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn memset( - __b: *mut ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __len: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; + pub fn strncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strcat( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, + pub fn strncat( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strcmp( + pub fn strcmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strncmp( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } extern "C" { @@ -11749,48 +2333,114 @@ extern "C" { ) -> ::std::os::raw::c_int; } extern "C" { - pub fn strcpy( - __dst: *mut ::std::os::raw::c_char, + pub fn strxfrm( + __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcspn( - __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_ulong; } -extern "C" { - pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __locale_struct { + pub __locales: [*mut __locale_data; 13usize], + pub __ctype_b: *const ::std::os::raw::c_ushort, + pub __ctype_tolower: *const ::std::os::raw::c_int, + pub __ctype_toupper: *const ::std::os::raw::c_int, + pub __names: [*const ::std::os::raw::c_char; 13usize], } -extern "C" { - pub fn strncat( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; +#[test] +fn bindgen_test_layout___locale_struct() { + assert_eq!( + ::std::mem::size_of::<__locale_struct>(), + 232usize, + concat!("Size of: ", stringify!(__locale_struct)) + ); + assert_eq!( + ::std::mem::align_of::<__locale_struct>(), + 8usize, + concat!("Alignment of ", stringify!(__locale_struct)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__locale_struct>())).__locales as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__locale_struct), + "::", + stringify!(__locales) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_b as *const _ as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(__locale_struct), + "::", + stringify!(__ctype_b) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_tolower as *const _ as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(__locale_struct), + "::", + stringify!(__ctype_tolower) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_toupper as *const _ as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(__locale_struct), + "::", + stringify!(__ctype_toupper) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<__locale_struct>())).__names as *const _ as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(__locale_struct), + "::", + stringify!(__names) + ) + ); } +pub type __locale_t = *mut __locale_struct; +pub type locale_t = __locale_t; extern "C" { - pub fn strncmp( + pub fn strcoll_l( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, + __l: locale_t, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn strncpy( - __dst: *mut ::std::os::raw::c_char, + pub fn strxfrm_l( + __dest: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, + __n: usize, + __l: locale_t, + ) -> usize; +} +extern "C" { + pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strndup( + __string: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strpbrk( + pub fn strchr( __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { @@ -11799,236 +2449,176 @@ extern "C" { __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } +extern "C" { + pub fn strcspn( + __s: *const ::std::os::raw::c_char, + __reject: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_ulong; +} extern "C" { pub fn strspn( __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, + __accept: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_ulong; } +extern "C" { + pub fn strpbrk( + __s: *const ::std::os::raw::c_char, + __accept: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} extern "C" { pub fn strstr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, + __haystack: *const ::std::os::raw::c_char, + __needle: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strtok( - __str: *mut ::std::os::raw::c_char, - __sep: *const ::std::os::raw::c_char, + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strxfrm( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; + pub fn __strtok_r( + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + __save_ptr: *mut *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn strtok_r( - __str: *mut ::std::os::raw::c_char, - __sep: *const ::std::os::raw::c_char, - __lasts: *mut *mut ::std::os::raw::c_char, + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + __save_ptr: *mut *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strerror_r( - __errnum: ::std::os::raw::c_int, - __strerrbuf: *mut ::std::os::raw::c_char, - __buflen: usize, - ) -> ::std::os::raw::c_int; + pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; } extern "C" { - pub fn strdup(__s1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; + pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize; } extern "C" { - pub fn memccpy( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; + pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn stpcpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; + #[link_name = "\u{1}__xpg_strerror_r"] + pub fn strerror_r( + __errnum: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __buflen: usize, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn stpncpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, + pub fn strerror_l( + __errnum: ::std::os::raw::c_int, + __l: locale_t, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strndup( - __s1: *const ::std::os::raw::c_char, + pub fn bcmp( + __s1: *const ::std::os::raw::c_void, + __s2: *const ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strnlen(__s1: *const ::std::os::raw::c_char, __n: usize) -> usize; -} -extern "C" { - pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -pub type rsize_t = __darwin_size_t; -pub type errno_t = ::std::os::raw::c_int; -extern "C" { - pub fn memset_s( - __s: *mut ::std::os::raw::c_void, - __smax: rsize_t, - __c: ::std::os::raw::c_int, - __n: rsize_t, - ) -> errno_t; -} -extern "C" { - pub fn memmem( - __big: *const ::std::os::raw::c_void, - __big_len: usize, - __little: *const ::std::os::raw::c_void, - __little_len: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memset_pattern4( - __b: *mut ::std::os::raw::c_void, - __pattern4: *const ::std::os::raw::c_void, - __len: usize, - ); + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn memset_pattern8( - __b: *mut ::std::os::raw::c_void, - __pattern8: *const ::std::os::raw::c_void, - __len: usize, + pub fn bcopy( + __src: *const ::std::os::raw::c_void, + __dest: *mut ::std::os::raw::c_void, + __n: usize, ); } extern "C" { - pub fn memset_pattern16( - __b: *mut ::std::os::raw::c_void, - __pattern16: *const ::std::os::raw::c_void, - __len: usize, - ); + pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong); } extern "C" { - pub fn strcasestr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, + pub fn index( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strnstr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, - __len: usize, + pub fn rindex( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn strlcat( - __dst: *mut ::std::os::raw::c_char, - __source: *const ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strlcpy( - __dst: *mut ::std::os::raw::c_char, - __source: *const ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strmode(__mode: ::std::os::raw::c_int, __bp: *mut ::std::os::raw::c_char); + pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } extern "C" { - pub fn strsep( - __stringp: *mut *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; + pub fn ffsl(__l: ::std::os::raw::c_long) -> ::std::os::raw::c_int; } extern "C" { - pub fn swab( - arg1: *const ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: isize, - ); + pub fn ffsll(__ll: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; } extern "C" { - pub fn timingsafe_bcmp( - __b1: *const ::std::os::raw::c_void, - __b2: *const ::std::os::raw::c_void, - __len: usize, + pub fn strcasecmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn strsignal_r( - __sig: ::std::os::raw::c_int, - __strsignalbuf: *mut ::std::os::raw::c_char, - __buflen: usize, + pub fn strncasecmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn bcmp( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_ulong, + pub fn strcasecmp_l( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __loc: locale_t, ) -> ::std::os::raw::c_int; } extern "C" { - pub fn bcopy( - arg1: *const ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: usize, - ); -} -extern "C" { - pub fn bzero(arg1: *mut ::std::os::raw::c_void, arg2: ::std::os::raw::c_ulong); + pub fn strncasecmp_l( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __n: usize, + __loc: locale_t, + ) -> ::std::os::raw::c_int; } extern "C" { - pub fn index( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; + pub fn explicit_bzero(__s: *mut ::std::os::raw::c_void, __n: usize); } extern "C" { - pub fn rindex( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, + pub fn strsep( + __stringp: *mut *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn ffs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcasecmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncasecmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ffsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; + pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn ffsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; + pub fn __stpcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn fls(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; + pub fn stpcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn flsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; + pub fn __stpncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> *mut ::std::os::raw::c_char; } extern "C" { - pub fn flsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; + pub fn stpncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_char; } #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -15898,65 +6488,20 @@ fn bindgen_test_layout_OrtCustomOp() { ) ); } -pub type __builtin_va_list = [__va_list_tag; 1usize]; +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_CPU( + options: *mut OrtSessionOptions, + use_arena: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_CUDA( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: ::std::os::raw::c_uint, - pub fp_offset: ::std::os::raw::c_uint, - pub overflow_arg_area: *mut ::std::os::raw::c_void, - pub reg_save_area: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); +pub struct __locale_data { + pub _address: u8, } diff --git a/onnxruntime-sys/wrapper.h b/onnxruntime-sys/wrapper.h index e63d3523..3e47c96c 100644 --- a/onnxruntime-sys/wrapper.h +++ b/onnxruntime-sys/wrapper.h @@ -1 +1,3 @@ #include "onnxruntime_c_api.h" +#include "cpu_provider_factory.h" +#include "cuda_provider_factory.h" \ No newline at end of file diff --git a/onnxruntime/src/session.rs b/onnxruntime/src/session.rs index 9a846c01..45455879 100644 --- a/onnxruntime/src/session.rs +++ b/onnxruntime/src/session.rs @@ -130,6 +130,22 @@ impl<'a> SessionBuilder<'a> { Ok(self) } + /// Set the session to use cuda + pub fn use_cpu(self, use_arena: i32) -> Result> { + unsafe { + sys::OrtSessionOptionsAppendExecutionProvider_CPU(self.session_options_ptr, use_arena); + } + Ok(self) + } + + /// Set the session to use cuda + pub fn use_cuda(self, device_id: i32) -> Result> { + unsafe { + sys::OrtSessionOptionsAppendExecutionProvider_CUDA(self.session_options_ptr, device_id); + } + Ok(self) + } + /// Set the session's allocator /// /// Defaults to [`AllocatorType::Arena`](../enum.AllocatorType.html#variant.Arena) From 68036f284bdb9a1907ab085d383c1f224a9cd62d Mon Sep 17 00:00:00 2001 From: Xavier Tao Date: Mon, 9 Aug 2021 03:54:59 -0700 Subject: [PATCH 2/5] Adding Windows Bindings --- .../src/generated/windows/x86/bindings.rs | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/onnxruntime-sys/src/generated/windows/x86/bindings.rs b/onnxruntime-sys/src/generated/windows/x86/bindings.rs index 53dfca67..60d546f3 100644 --- a/onnxruntime-sys/src/generated/windows/x86/bindings.rs +++ b/onnxruntime-sys/src/generated/windows/x86/bindings.rs @@ -473,7 +473,21 @@ extern "C" { _Alignment: usize, ) -> *mut ::std::os::raw::c_void; } -pub type max_align_t = f64; +extern "C" { + pub fn _errno() -> *mut ::std::os::raw::c_int; +} +extern "C" { + pub fn _set_errno(_Value: ::std::os::raw::c_int) -> errno_t; +} +extern "C" { + pub fn _get_errno(_Value: *mut ::std::os::raw::c_int) -> errno_t; +} +extern "C" { + pub fn __threadid() -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn __threadhandle() -> usize; +} pub type _CoreCrtSecureSearchSortCompareFunction = ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, @@ -972,15 +986,6 @@ extern "C" { extern "C" { pub fn _set_error_mode(_Mode: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { - pub fn _errno() -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn _set_errno(_Value: ::std::os::raw::c_int) -> errno_t; -} -extern "C" { - pub fn _get_errno(_Value: *mut ::std::os::raw::c_int) -> errno_t; -} extern "C" { pub fn __doserrno() -> *mut ::std::os::raw::c_ulong; } @@ -6660,6 +6665,18 @@ fn bindgen_test_layout_OrtCustomOp() { ) ); } +extern "stdcall" { + pub fn OrtSessionOptionsAppendExecutionProvider_CPU( + options: *mut OrtSessionOptions, + use_arena: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} +extern "stdcall" { + pub fn OrtSessionOptionsAppendExecutionProvider_CUDA( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __crt_locale_data { From 69d491359cbe3395aaae952d2a4716a13dfa1ac5 Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 9 Aug 2021 14:27:26 +0200 Subject: [PATCH 3/5] Add feature cuda for better ergonomics --- README.md | 40 +++++++++++++++++++------------------- onnxruntime-sys/Cargo.toml | 1 + onnxruntime-sys/build.rs | 22 +++++++-------------- onnxruntime/Cargo.toml | 1 + onnxruntime/src/session.rs | 3 ++- 5 files changed, 31 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 32cfe030..54a21a2d 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ This is an attempt at a Rust wrapper for This project consist on two crates: -* [`onnxruntime-sys`](onnxruntime-sys): Low-level binding to the C API; -* [`onnxruntime`](onnxruntime): High-level and safe API. +- [`onnxruntime-sys`](onnxruntime-sys): Low-level binding to the C API; +- [`onnxruntime`](onnxruntime): High-level and safe API. [Changelog](CHANGELOG.md) @@ -21,25 +21,25 @@ which provides the following targets: CPU: -* Linux x86_64 -* macOS x86_64 -* macOS aarch64 (no pre-built binaries, no CI testing, see [#74](https://github.com/nbigaouette/onnxruntime-rs/pull/74)) -* Windows i686 -* Windows x86_64 +- Linux x86_64 +- macOS x86_64 +- macOS aarch64 (no pre-built binaries, no CI testing, see [#74](https://github.com/nbigaouette/onnxruntime-rs/pull/74)) +- Windows i686 +- Windows x86_64 GPU: -* Linux x86_64 -* Windows x86_64 +- Linux x86_64 +- Windows x86_64 --- **WARNING**: -* This is an experiment and work in progress; it is _not_ complete/working/safe. Help welcome! -* Basic inference works, see [`onnxruntime/examples/sample.rs`](onnxruntime/examples/sample.rs) or [`onnxruntime/tests/integration_tests.rs`](onnxruntime/tests/integration_tests.rs) -* ONNX Runtime has many options to control the inference process but those options are not yet exposed. -* This was developed and tested on macOS Catalina. Other platforms should work but have not been tested. +- This is an experiment and work in progress; it is _not_ complete/working/safe. Help welcome! +- Basic inference works, see [`onnxruntime/examples/sample.rs`](onnxruntime/examples/sample.rs) or [`onnxruntime/tests/integration_tests.rs`](onnxruntime/tests/integration_tests.rs) +- ONNX Runtime has many options to control the inference process but those options are not yet exposed. +- This was developed and tested on macOS Catalina. Other platforms should work but have not been tested. --- @@ -58,14 +58,14 @@ To select which strategy to use, set the `ORT_STRATEGY` environment variable to: 3. `compile`: To compile the library The `download` strategy supports downloading a version of ONNX that supports CUDA. To use this, set the -environment variable `ORT_USE_CUDA=1` (only supports Linux or Windows). +feature `cuda` in `Cargo.toml`. Until the build script allow compilation of the runtime, see the [compilation notes](ONNX_Compilation_Notes.md) for some details on the process. ### Note on using CUDA -To use CUDA you will need to set `ORT_USE_CUDA=1` but also to set your session with the method `use_cuda` as such: +To use CUDA you will need to set the feature `cuda` but also to set your session with the method `use_cuda` as such: ``` let mut session = environment @@ -86,9 +86,9 @@ dyld: Library not loaded: @rpath/libonnxruntime.1.7.1.dylib To fix, one can either: -* Set the `LD_LIBRARY_PATH` environment variable to point to the path where the library can be found. -* Adapt the `.cargo/config` file to contain a linker flag to provide the **full** path: - +- Set the `LD_LIBRARY_PATH` environment variable to point to the path where the library can be found. +- Adapt the `.cargo/config` file to contain a linker flag to provide the **full** path: + ```toml [target.aarch64-apple-darwin] rustflags = ["-C", "link-args=-Wl,-rpath,/full/path/to/onnxruntime/lib"] @@ -269,9 +269,9 @@ instead of the Rust moderation team. This project is licensed under either of -* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or +- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) -* MIT license ([LICENSE-MIT](LICENSE-MIT) or +- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) at your option. diff --git a/onnxruntime-sys/Cargo.toml b/onnxruntime-sys/Cargo.toml index 942ca74c..f3e45fa4 100644 --- a/onnxruntime-sys/Cargo.toml +++ b/onnxruntime-sys/Cargo.toml @@ -34,6 +34,7 @@ default = [] disable-sys-build-script = [] # Use bindgen to generate bindings in build.rs generate-bindings = ["bindgen"] +cuda = [] [package.metadata.docs.rs] # Disable the build.rs on https://docs.rs since it can cause diff --git a/onnxruntime-sys/build.rs b/onnxruntime-sys/build.rs index 6fac6d24..f41fdce3 100644 --- a/onnxruntime-sys/build.rs +++ b/onnxruntime-sys/build.rs @@ -28,8 +28,6 @@ const ORT_ENV_STRATEGY: &str = "ORT_STRATEGY"; /// Name of environment variable that, if present, contains the location of a pre-built library. /// Only used if `ORT_STRATEGY=system`. const ORT_ENV_SYSTEM_LIB_LOCATION: &str = "ORT_LIB_LOCATION"; -/// Name of environment variable that, if present, controls wether to use CUDA or not. -const ORT_ENV_GPU: &str = "ORT_USE_CUDA"; /// Subdirectory (of the 'target' directory) into which to extract the prebuilt library. const ORT_PREBUILT_EXTRACT_DIR: &str = "onnxruntime"; @@ -54,7 +52,6 @@ fn main() { println!("cargo:rustc-link-search=native={}", lib_dir.display()); println!("cargo:rerun-if-env-changed={}", ORT_ENV_STRATEGY); - println!("cargo:rerun-if-env-changed={}", ORT_ENV_GPU); println!("cargo:rerun-if-env-changed={}", ORT_ENV_SYSTEM_LIB_LOCATION); generate_bindings(&include_dir); @@ -280,17 +277,6 @@ enum Accelerator { Gpu, } -impl FromStr for Accelerator { - type Err = String; - - fn from_str(s: &str) -> Result { - match s.to_lowercase().as_str() { - "1" | "yes" | "true" | "on" => Ok(Accelerator::Gpu), - _ => Ok(Accelerator::None), - } - } -} - impl OnnxPrebuiltArchive for Accelerator { fn as_onnx_str(&self) -> Cow { match self { @@ -353,6 +339,12 @@ impl OnnxPrebuiltArchive for Triplet { } fn prebuilt_archive_url() -> (PathBuf, String) { + let accelerator = if cfg!(feature = "cuda") { + Accelerator::Gpu + } else { + Accelerator::None + }; + let triplet = Triplet { os: env::var("CARGO_CFG_TARGET_OS") .expect("Unable to get TARGET_OS") @@ -362,7 +354,7 @@ fn prebuilt_archive_url() -> (PathBuf, String) { .expect("Unable to get TARGET_ARCH") .parse() .unwrap(), - accelerator: env::var(ORT_ENV_GPU).unwrap_or_default().parse().unwrap(), + accelerator, }; let prebuilt_archive = format!( diff --git a/onnxruntime/Cargo.toml b/onnxruntime/Cargo.toml index 8dd12d00..ef1c6d7c 100644 --- a/onnxruntime/Cargo.toml +++ b/onnxruntime/Cargo.toml @@ -41,6 +41,7 @@ model-fetching = ["ureq"] # Disable build script; used for https://docs.rs disable-sys-build-script = ["onnxruntime-sys/disable-sys-build-script"] generate-bindings = ["onnxruntime-sys/generate-bindings"] +cuda = ["onnxruntime-sys/cuda"] [package.metadata.docs.rs] features = ["disable-sys-build-script", "model-fetching"] diff --git a/onnxruntime/src/session.rs b/onnxruntime/src/session.rs index 45455879..99cec773 100644 --- a/onnxruntime/src/session.rs +++ b/onnxruntime/src/session.rs @@ -130,7 +130,7 @@ impl<'a> SessionBuilder<'a> { Ok(self) } - /// Set the session to use cuda + /// Set the session to use cpu pub fn use_cpu(self, use_arena: i32) -> Result> { unsafe { sys::OrtSessionOptionsAppendExecutionProvider_CPU(self.session_options_ptr, use_arena); @@ -138,6 +138,7 @@ impl<'a> SessionBuilder<'a> { Ok(self) } + #[cfg(feature = "cuda")] /// Set the session to use cuda pub fn use_cuda(self, device_id: i32) -> Result> { unsafe { From 61f05c54f17ebc747090bbcb98083d51829a10ca Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 9 Aug 2021 14:28:02 +0200 Subject: [PATCH 4/5] fix apple gpu download bug --- onnxruntime-sys/wrapper.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/onnxruntime-sys/wrapper.h b/onnxruntime-sys/wrapper.h index 3e47c96c..7379eaaf 100644 --- a/onnxruntime-sys/wrapper.h +++ b/onnxruntime-sys/wrapper.h @@ -1,3 +1,5 @@ #include "onnxruntime_c_api.h" #include "cpu_provider_factory.h" -#include "cuda_provider_factory.h" \ No newline at end of file +#if !defined(__APPLE__) +#include "cuda_provider_factory.h" +#endif \ No newline at end of file From 045e470aff20a7cf4145f7e4b486a7fc6acf1fad Mon Sep 17 00:00:00 2001 From: haixuanTao Date: Mon, 9 Aug 2021 14:42:26 +0200 Subject: [PATCH 5/5] fixing workflow configuration fix apple gpu download bug adding windows bindings fixing apple no gpu problem fixing workflow mistake --- .github/workflows/general.yml | 9 +---- README.md | 6 +-- onnxruntime-sys/examples/c_api_sample.rs | 2 - .../src/generated/windows/x86_64/bindings.rs | 37 ++++++++++++++----- onnxruntime-sys/wrapper.h | 4 +- onnxruntime/src/session.rs | 3 +- 6 files changed, 36 insertions(+), 25 deletions(-) diff --git a/.github/workflows/general.yml b/.github/workflows/general.yml index f5e9b748..ff446195 100644 --- a/.github/workflows/general.yml +++ b/.github/workflows/general.yml @@ -73,21 +73,17 @@ jobs: # ****************************************************************** - name: Download prebuilt archive (GPU, x86_64-unknown-linux-gnu) uses: actions-rs/cargo@v1 - env: - ORT_USE_CUDA: "yes" with: command: build - args: --target x86_64-unknown-linux-gnu + args: --target x86_64-unknown-linux-gnu --features cuda - name: Verify prebuilt archive downloaded (GPU, x86_64-unknown-linux-gnu) run: ls -lh target/x86_64-unknown-linux-gnu/debug/build/onnxruntime-sys-*/out/onnxruntime-linux-x64-gpu-1.*.tgz # ****************************************************************** - name: Download prebuilt archive (GPU, x86_64-pc-windows-msvc) uses: actions-rs/cargo@v1 - env: - ORT_USE_CUDA: "yes" with: command: build - args: --target x86_64-pc-windows-msvc + args: --target x86_64-pc-windows-msvc --features cuda - name: Verify prebuilt archive downloaded (GPU, x86_64-pc-windows-msvc) run: ls -lh target/x86_64-pc-windows-msvc/debug/build/onnxruntime-sys-*/out/onnxruntime-win-gpu-x64-1.*.zip @@ -141,7 +137,6 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - # Use --manifest-path instead of --package. See https://github.com/actions-rs/cargo/issues/86 args: --manifest-path onnxruntime/Cargo.toml --features model-fetching - name: Test onnxruntime-sys uses: actions-rs/cargo@v1 diff --git a/README.md b/README.md index 54a21a2d..93a73a47 100644 --- a/README.md +++ b/README.md @@ -242,7 +242,7 @@ Generate the bindings: ```sh ❯ docker exec -it --user "$(id -u)":"$(id -g)" rustbuilder /bin/bash ❯ cd onnxruntime-sys -❯ cargo build --features generate-bindings +❯ cargo build --features 'generate-bindings, cuda' ``` ### Generating Bindings for Windows With Vagrant @@ -255,8 +255,8 @@ Windows can build both x86 and x86_64 bindings: ```sh ❯ rustup target add i686-pc-windows-msvc x86_64-pc-windows-msvc ❯ cd onnxruntime-sys -❯ cargo build --features generate-bindings --target i686-pc-windows-msvc -❯ cargo build --features generate-bindings --target x86_64-pc-windows-msvc +❯ cargo build --features 'generate-bindings, cuda' --target i686-pc-windows-msvc +❯ cargo build --features 'generate-bindings, cuda' --target x86_64-pc-windows-msvc ``` ## Conduct diff --git a/onnxruntime-sys/examples/c_api_sample.rs b/onnxruntime-sys/examples/c_api_sample.rs index fde8df08..ec6ed024 100644 --- a/onnxruntime-sys/examples/c_api_sample.rs +++ b/onnxruntime-sys/examples/c_api_sample.rs @@ -49,8 +49,6 @@ fn main() { }; // Optionally add more execution providers via session_options - // E.g. for CUDA include cuda_provider_factory.h and uncomment the following line: - // OrtSessionOptionsAppendExecutionProvider_CUDA(sessionOptions, 0); //************************************************************************* // create session and load model into memory diff --git a/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs b/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs index 000bf5f4..bc9a0024 100644 --- a/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs +++ b/onnxruntime-sys/src/generated/windows/x86_64/bindings.rs @@ -476,7 +476,21 @@ extern "C" { _Alignment: usize, ) -> *mut ::std::os::raw::c_void; } -pub type max_align_t = f64; +extern "C" { + pub fn _errno() -> *mut ::std::os::raw::c_int; +} +extern "C" { + pub fn _set_errno(_Value: ::std::os::raw::c_int) -> errno_t; +} +extern "C" { + pub fn _get_errno(_Value: *mut ::std::os::raw::c_int) -> errno_t; +} +extern "C" { + pub fn __threadid() -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn __threadhandle() -> usize; +} pub type _CoreCrtSecureSearchSortCompareFunction = ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, @@ -975,15 +989,6 @@ extern "C" { extern "C" { pub fn _set_error_mode(_Mode: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { - pub fn _errno() -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn _set_errno(_Value: ::std::os::raw::c_int) -> errno_t; -} -extern "C" { - pub fn _get_errno(_Value: *mut ::std::os::raw::c_int) -> errno_t; -} extern "C" { pub fn __doserrno() -> *mut ::std::os::raw::c_ulong; } @@ -6626,6 +6631,18 @@ fn bindgen_test_layout_OrtCustomOp() { ) ); } +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_CPU( + options: *mut OrtSessionOptions, + use_arena: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_CUDA( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __crt_locale_data { diff --git a/onnxruntime-sys/wrapper.h b/onnxruntime-sys/wrapper.h index 7379eaaf..a3f17369 100644 --- a/onnxruntime-sys/wrapper.h +++ b/onnxruntime-sys/wrapper.h @@ -1,5 +1,5 @@ #include "onnxruntime_c_api.h" -#include "cpu_provider_factory.h" #if !defined(__APPLE__) +#include "cpu_provider_factory.h" #include "cuda_provider_factory.h" -#endif \ No newline at end of file +#endif diff --git a/onnxruntime/src/session.rs b/onnxruntime/src/session.rs index 99cec773..76cea7b6 100644 --- a/onnxruntime/src/session.rs +++ b/onnxruntime/src/session.rs @@ -131,6 +131,7 @@ impl<'a> SessionBuilder<'a> { } /// Set the session to use cpu + #[cfg(feature = "cuda")] pub fn use_cpu(self, use_arena: i32) -> Result> { unsafe { sys::OrtSessionOptionsAppendExecutionProvider_CPU(self.session_options_ptr, use_arena); @@ -138,8 +139,8 @@ impl<'a> SessionBuilder<'a> { Ok(self) } - #[cfg(feature = "cuda")] /// Set the session to use cuda + #[cfg(feature = "cuda")] pub fn use_cuda(self, device_id: i32) -> Result> { unsafe { sys::OrtSessionOptionsAppendExecutionProvider_CUDA(self.session_options_ptr, device_id);