wasmtime_internal_fiber/
stackswitch.rs1cfg_if::cfg_if! {
8 if #[cfg(target_arch = "aarch64")] {
9 mod aarch64;
10 pub(crate) use supported::*;
11 pub(crate) use aarch64::*;
12 } else if #[cfg(target_arch = "x86_64")] {
13 mod x86_64;
14 pub(crate) use supported::*;
15 pub(crate) use x86_64::*;
16 } else if #[cfg(target_arch = "x86")] {
17 mod x86;
18 pub(crate) use supported::*;
19 pub(crate) use x86::*;
20 } else if #[cfg(target_arch = "arm")] {
21 mod arm;
22 pub(crate) use supported::*;
23 pub(crate) use arm::*;
24 } else if #[cfg(target_arch = "s390x")] {
25 mod s390x;
26 pub(crate) use supported::*;
27 pub(crate) use s390x::*;
28 } else if #[cfg(target_arch = "riscv64")] {
29 mod riscv64;
30 pub(crate) use supported::*;
31 pub(crate) use riscv64::*;
32 } else {
33 pub(crate) use unsupported::*;
38 }
39}
40
41#[allow(
45 dead_code,
46 reason = "expected to have dead code in some configurations"
47)]
48mod supported {
49 pub const SUPPORTED_ARCH: bool = true;
50}
51
52#[allow(
56 dead_code,
57 reason = "expected to have dead code in some configurations"
58)]
59mod unsupported {
60 pub const SUPPORTED_ARCH: bool = false;
61
62 pub(crate) unsafe fn wasmtime_fiber_init(
63 _top_of_stack: *mut u8,
64 _entry: extern "C" fn(*mut u8, *mut u8),
65 _entry_arg0: *mut u8,
66 ) {
67 unreachable!();
68 }
69
70 pub(crate) unsafe fn wasmtime_fiber_switch(_top_of_stack: *mut u8) {
71 unreachable!();
72 }
73}