1
0
Fork 0
forked from AbleOS/ableos
ableos-idl/kernel/src/lib.rs

26 lines
551 B
Rust
Raw Normal View History

#![deny(missing_docs)]
#![no_std]
//! The ableOS kernel.
pub mod kernel_time;
pub mod messaging;
pub mod proccess;
// #[cfg(no_std)]
pub mod panic;
use core::sync::atomic::{AtomicU64, Ordering::Relaxed};
/// called by arch specific timers to tick up all kernel related functions
pub fn tick() {
let mut data = TICK.load(Relaxed);
data = data.wrapping_add(1);
TICK.store(data, Relaxed)
}
lazy_static::lazy_static! {
/// The number of ticks since the first CPU was started
pub static ref TICK: AtomicU64 = AtomicU64::new(0);
}