Files
riscv64-kernel/src/user.rs

23 lines
597 B
Rust

//! Example user processes used for testing and demonstrations.
//!
//! Provides a couple of simple user-space loops used to exercise syscalls
//! and the scheduler.
use core::time::Duration;
use shared::syscall::{sleep, write_string_temp};
pub fn test(_argc: isize, _argv: *const *const u8) {
loop {
// write_string_temp(str::from_utf8(_args[0]).unwrap());
write_string_temp("test");
sleep(Duration::new(2, 0));
}
}
pub fn proc2(_argc: isize, _argv: *const *const u8) {
loop {
write_string_temp("proc2");
sleep(Duration::new(3, 0));
}
}