bern_arch/
lib.rs

1//! Bern RTOS kernel architecture support.
2//!
3//! This crates was developed for the `bern_kernel` but can be used as basis for
4//! any real-time operating system.
5//!
6//! # Documentation
7//!
8//! - [Bern RTOS Kernel Book](https://kernel.bern-rtos.org/)
9//! - [API Documentation](https://docs.rs/bern-arch/)
10//!
11//! # License
12//! - [MIT License](https://gitlab.com/bern-rtos/bern-rtos/-/blob/main/arch/LICENSE.md)
13
14#![cfg_attr(target_os = "none", no_std)]
15#![allow(unused)]
16
17pub mod core;
18pub mod memory_protection;
19pub mod scheduler;
20pub mod startup;
21pub mod sync;
22pub mod syscall;
23
24// re-exports
25pub use crate::core::ICore;
26pub use crate::memory_protection::IMemoryProtection;
27pub use crate::scheduler::IScheduler;
28pub use crate::startup::IStartup;
29pub use crate::sync::ISync;
30pub use crate::syscall::ISyscall;
31
32// select architecture support
33#[cfg(not(target_os = "none"))]
34pub mod mock;
35#[cfg(not(target_os = "none"))]
36pub use crate::mock as arch;
37
38#[cfg(all(arm_cortex_m, target_os = "none"))]
39pub mod cortex_m;
40#[cfg(all(arm_cortex_m, target_os = "none"))]
41pub use crate::cortex_m as arch;