1
0
Fork 0
forked from AbleOS/ableos
ableos_time/kernel/src/lib.rs
Erin cd8e6e4b3b So I have two news for you. One good and one bad.
We have async, but we got rid of the preëmptive sched... wait, that's two good news, anyways, have a nice day.

— Erin
2022-08-07 23:42:23 +02:00

48 lines
916 B
Rust

//! The ableOS kernel.
#![feature(alloc_error_handler)]
#![feature(arbitrary_enum_discriminant)]
#![feature(prelude_import)]
#![no_std]
#![deny(missing_docs)]
extern crate alloc;
pub mod aalloc;
pub mod allocator;
pub mod arch;
pub mod device_interface;
pub mod messaging;
// pub mod panic;
pub mod proccess;
pub mod syscalls;
pub mod task;
pub mod time;
use core::arch::asm;
use versioning::Version;
/// The number of ticks since the first CPU was started
// pub static TICK: AtomicU64 = AtomicU64::new(0);
/// Kernel's version
pub const KERNEL_VERSION: Version = Version {
major: 0,
minor: 1,
patch: 2,
};
/*
/// 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)
}
*/
/// Cause a software interrupt
pub fn software_int() {
unsafe { asm!("int 54") }
}