sel4_sys/syscalls/helpers/arch/
mod.rs
1use core::ffi::c_int;
8
9use sel4_config::sel4_cfg_if;
10
11use crate::seL4_Word;
12
13sel4_cfg_if! {
14 if #[sel4_cfg(ARCH_AARCH64)] {
15 #[path = "aarch64.rs"]
16 mod imp;
17 } else if #[sel4_cfg(ARCH_AARCH32)] {
18 #[path = "aarch32.rs"]
19 mod imp;
20 } else if #[sel4_cfg(any(ARCH_RISCV64, ARCH_RISCV32))] {
21 #[path = "riscv.rs"]
22 mod imp;
23 } else if #[sel4_cfg(ARCH_X86_64)] {
24 #[path = "x86_64.rs"]
25 mod imp;
26 }
27}
28
29#[cfg(any())]
31mod aarch32;
32#[cfg(any())]
33mod aarch64;
34#[cfg(any())]
35mod riscv;
36#[cfg(any())]
37mod x86_64;
38
39pub use imp::*;
40
41fn sys_id_to_word(sys_id: c_int) -> seL4_Word {
42 sys_id as seL4_Word
43}