preemptive_threads/
lib.rs

1#![no_std]
2
3pub mod thread;
4pub mod scheduler;
5pub mod context;
6pub mod sync;
7pub mod preemption;
8pub mod error;
9
10#[cfg(all(test, feature = "std"))]
11mod tests;
12
13#[cfg(test)]
14extern crate std;
15
16
17#[cfg(all(not(test), not(feature = "std")))]
18use core::panic::PanicInfo;
19
20#[cfg(all(not(test), not(feature = "std")))]
21#[panic_handler]
22fn panic(_info: &PanicInfo) -> ! {
23    loop {}
24}
25
26pub use thread::{Thread, ThreadId, ThreadState};
27pub use scheduler::{Scheduler, SCHEDULER};
28pub use sync::{yield_thread, exit_thread};
29pub use error::{ThreadError, ThreadResult};