1#![cfg_attr(any(not(test), target_os = "none"), no_std)]
26#![cfg_attr(all(test, target_os = "none"), no_main)]
27#![cfg_attr(all(test, target_os = "none"), feature(custom_test_frameworks))]
28#![cfg_attr(doc, feature(doc_cfg))]
29#![cfg_attr(
30 all(test, target_os = "none"),
31 test_runner(crate::bare_metal_test_runner)
32)]
33
34#[cfg(all(feature = "host-test", not(target_os = "none")))]
35extern crate std;
36
37pub mod sync;
39
40#[cfg(all(test, target_os = "none"))]
41fn bare_metal_test_runner(_tests: &[&dyn Fn()]) {}
42
43#[cfg(all(test, target_os = "none"))]
44#[unsafe(no_mangle)]
45extern "C" fn _start() -> ! {
46 loop {
47 core::hint::spin_loop();
48 }
49}
50
51#[cfg(all(test, target_os = "none"))]
52#[panic_handler]
53fn panic(_info: &core::panic::PanicInfo<'_>) -> ! {
54 loop {
55 core::hint::spin_loop();
56 }
57}
58
59mod build_info {
60 include!(concat!(env!("OUT_DIR"), "/build_info.rs"));
61}
62
63#[macro_use]
64extern crate log;
65extern crate alloc;
66
67#[macro_use]
68mod run_queue;
69mod api;
70mod interrupt;
71mod irq_notify;
72#[cfg(feature = "lockdep")]
73mod lockdep;
74#[doc(hidden)]
75pub mod runtime_preempt;
76#[cfg(feature = "tracepoint-hooks")]
77mod sched_tracepoint;
78mod task;
79mod timers;
80mod wait_queue;
81
82pub mod future;
83
84#[cfg(all(feature = "smp", feature = "ipi"))]
85pub use self::run_queue::handle_ipi_reschedule;
86#[cfg(feature = "tracepoint-hooks")]
87pub use self::sched_tracepoint::SchedTracepoint;
88pub use self::{
89 api::{sleep, sleep_until, yield_now, *},
90 irq_notify::IrqNotify,
91};