diff --git a/library/std/src/os/mikros/syscalls.rs b/library/std/src/os/mikros/syscalls.rs index 91887111adb..aed11d6d18d 100644 --- a/library/std/src/os/mikros/syscalls.rs +++ b/library/std/src/os/mikros/syscalls.rs @@ -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) +} diff --git a/library/std/src/sys/pal/mikros/process.rs b/library/std/src/sys/pal/mikros/process.rs index 7aeaf02c338..4f4e598c788 100644 --- a/library/std/src/sys/pal/mikros/process.rs +++ b/library/std/src/sys/pal/mikros/process.rs @@ -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 })) } diff --git a/library/std/src/sys/pal/mikros/syscalls.rs b/library/std/src/sys/pal/mikros/syscalls.rs index f99495c4234..fe733b37597 100644 --- a/library/std/src/sys/pal/mikros/syscalls.rs +++ b/library/std/src/sys/pal/mikros/syscalls.rs @@ -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(()) } +}