zynq-rs/libcortex_a9/src/lib.rs

38 lines
586 B
Rust
Raw Normal View History

#![no_std]
#![feature(llvm_asm, global_asm)]
#![feature(never_type)]
#![feature(const_fn)]
2020-04-09 08:49:24 +08:00
extern crate alloc;
2019-05-05 20:56:23 +08:00
pub mod asm;
pub mod regs;
pub mod cache;
2019-06-17 09:32:10 +08:00
pub mod mmu;
2019-11-18 09:13:54 +08:00
pub mod mutex;
2020-04-09 08:49:24 +08:00
pub mod sync_channel;
2020-08-04 12:59:23 +08:00
pub mod semaphore;
2020-08-20 11:50:52 +08:00
pub mod l2c;
2020-06-18 06:51:13 +08:00
mod uncached;
2020-07-03 16:02:34 +08:00
mod fpu;
2020-06-18 06:51:13 +08:00
pub use uncached::UncachedSlice;
2020-07-03 16:02:34 +08:00
pub use fpu::enable_fpu;
2019-05-31 02:30:19 +08:00
global_asm!(include_str!("exceptions.s"));
#[inline]
pub fn spin_lock_yield() {
#[cfg(feature = "power_saving")]
asm::wfe();
}
#[inline]
pub fn notify_spin_lock() {
#[cfg(feature = "power_saving")]
{
asm::dsb();
asm::sev();
}
}