Adds syscall for sleep and print and makes process work in user mode

This commit is contained in:
2026-02-12 11:36:04 +01:00
parent 8a5c17482c
commit 369ff5fef4
9 changed files with 210 additions and 75 deletions

19
src/user.rs Normal file
View File

@@ -0,0 +1,19 @@
use core::time::Duration;
use crate::syscall::{sleep, write_string_temp};
pub extern "C" fn test() {
loop {
write_string_temp("test");
// enable_supervisor_interrupt();
sleep(Duration::new(2, 0));
}
}
pub extern "C" fn proc2() {
loop {
write_string_temp("proc2");
// enable_supervisor_interrupt();
sleep(Duration::new(3, 0));
}
}