forked from AbleOS/ableos
34 lines
673 B
Rust
34 lines
673 B
Rust
#![deny(missing_docs)]
|
|
#![no_std]
|
|
//! The ableOS kernel.
|
|
|
|
pub mod device_interface;
|
|
pub mod messaging;
|
|
pub mod panic;
|
|
pub mod proccess;
|
|
pub mod time;
|
|
|
|
use core::sync::atomic::{AtomicU64, Ordering::Relaxed};
|
|
|
|
use versioning::Version;
|
|
|
|
/// 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);
|
|
}
|
|
|
|
///
|
|
pub const KERNEL_VERSION: Version = Version {
|
|
major: 0,
|
|
minor: 1,
|
|
patch: 2,
|
|
};
|