mikros: Add wake_new syscall and wake new processes after setting STDIO

This commit is contained in:
pjht 2024-09-23 13:26:39 -05:00
parent 5ccb37a3f7
commit cdb711ae33
Signed by: pjht
GPG Key ID: CA239FC6934E6F3A
3 changed files with 10 additions and 0 deletions

View File

@ -36,3 +36,8 @@ pub fn get_pid() -> u64 {
pub fn irq_register(irq: u8) -> Result<(), ()> {
syscalls::irq_register(irq)
}
#[stable(feature = "mikros", since = "1.80.0")]
pub fn wake_new(pid: u64) -> Result<(), ()> {
syscalls::wake_new(pid)
}

View File

@ -141,6 +141,7 @@ pub fn spawn(
let _ = &rpc::send_call(vfs_pid, 2, 4, &postcard::to_allocvec(&(pid, stdio)).unwrap())
.get_return();
};
syscalls::wake_new(pid).unwrap();
Ok((Process { dummy: () }, StdioPipes { stdin: None, stdout: None, stderr: None }))
}

View File

@ -190,3 +190,7 @@ pub(crate) fn unmap(space: u64, page: Page, num_pages: usize) -> Result<(), ()>
pub fn irq_register(irq: u8) -> Result<(), ()> {
if syscall1(23, irq as u64) == 0 { Ok(()) } else { Err(()) }
}
pub fn wake_new(pid: u64) -> Result<(), ()> {
if syscall1(24, pid) == 0 { Ok(()) } else { Err(()) }
}