Better user programs with a special std. Sleep and exit are calling scheduler instead of wfi.

This commit is contained in:
2026-02-21 18:29:27 +01:00
parent 235f17e7cf
commit 8a8034bd11
25 changed files with 263 additions and 210 deletions

21
crates/os-std/src/lib.rs Normal file
View File

@@ -0,0 +1,21 @@
#![no_std]
mod prelude;
pub use shared::syscall;
#[macro_export]
macro_rules! custom_std_setup {
() => {
#[panic_handler]
fn panic(_panic_info: &core::panic::PanicInfo) -> ! {
// TODO print
loop {}
}
#[unsafe(no_mangle)]
pub extern "C" fn _start() {
main()
}
};
}

View File

@@ -0,0 +1 @@