preemptive_threads/
lib.rs

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