tg_rcore_tutorial_syscall/
lib.rs1#![no_std]
2#![deny(warnings)]
3#[cfg(all(feature = "kernel", feature = "user"))]
10compile_error!("You can only use one of `supervisor` or `user` features at a time");
11
12mod fs;
13mod io;
14mod time;
15
16include!(concat!(env!("OUT_DIR"), "/syscalls.rs"));
17pub use fs::*;
20pub use io::*;
21pub use tg_signal_defs::{SignalAction, SignalNo, MAX_SIG};
22pub use time::*;
23
24#[cfg(feature = "user")]
25mod user;
26
27#[cfg(feature = "user")]
28pub use user::*;
29
30#[cfg(feature = "kernel")]
31mod kernel;
32
33#[cfg(feature = "kernel")]
34pub use kernel::*;
35
36#[derive(PartialEq, Eq, Clone, Copy, Debug)]
40#[repr(transparent)]
41pub struct SyscallId(pub usize);
42
43impl From<usize> for SyscallId {
44 #[inline]
45 fn from(val: usize) -> Self {
46 Self(val)
47 }
48}