Debian Codegraph @

src/macos_compat.rs

raw symbols SCIP
1 use std::marker::PhantomData;
2
3 #[cfg(target_arch = "aarch64")]
4 const JMP_BUF_SIZE: usize = 48;
5 #[cfg(target_arch = "x86_64")]
6 const JMP_BUF_SIZE: usize = 37;
7
8 const SIG_JMP_BUF_SIZE: usize = JMP_BUF_SIZE + 1;
9
10 /// `JmpBufFields` are the accessible fields when viewed via a JmpBuf pointer.
11 /// But also: You shouldn't be poking at these!
12 #[repr(C)]
13 pub struct JmpBufFields {
14 _buf: [u32; JMP_BUF_SIZE],
15 _neither_send_nor_sync: PhantomData<*const u8>,
16 }
17
18 /// `SigJmpBufFields` are the accessible fields when viewed via a SigJmpBuf pointer.
19 /// But also: You shouldn't be poking at these!
20 #[repr(C)]
21 pub struct SigJmpBufFields {
22 _buf: [u32; SIG_JMP_BUF_SIZE],
23 _neither_send_nor_sync: PhantomData<*const u8>,
24 }
25
26 pub type JmpBufStruct = JmpBufFields;
27 pub type SigJmpBufStruct = SigJmpBufFields;