45 lines
758 B
Rust
Raw Normal View History

#![no_std]
2023-12-10 20:54:15 +02:00
#![feature(
maybe_uninit_slice,
step_trait,
const_trait_impl,
effects,
slice_ptr_get,
strict_provenance,
never_type,
let_chains
2023-12-10 20:54:15 +02:00
)]
use device_api::interrupt::MessageInterruptController;
extern crate alloc;
pub(crate) mod api;
pub mod mem;
pub mod runtime;
pub mod sync;
pub mod thread;
pub mod util;
2023-09-06 18:48:00 +03:00
#[inline]
pub fn message_interrupt_controller() -> &'static dyn MessageInterruptController {
unsafe { api::__message_interrupt_controller() }
}
2023-12-11 21:13:33 +02:00
#[inline]
pub fn cpu_index() -> usize {
unsafe { api::__cpu_index() }
}
#[inline]
pub fn cpu_count() -> usize {
unsafe { api::__cpu_count() }
}
2023-09-06 18:48:00 +03:00
#[repr(C)]
pub struct AlignedTo<Align, Bytes: ?Sized> {
pub align: [Align; 0],
pub bytes: Bytes,
}