From dbfeb119b5950ebb919bd005627cc94aa58317f2 Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 3 Nov 2024 11:06:14 -0600 Subject: [PATCH] mikros: Add the clear_exited syscall --- library/std/src/os/mikros/syscalls.rs | 5 +++++ library/std/src/sys/pal/mikros/syscalls.rs | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/library/std/src/os/mikros/syscalls.rs b/library/std/src/os/mikros/syscalls.rs index aed11d6d18d..b3fe02a2849 100644 --- a/library/std/src/os/mikros/syscalls.rs +++ b/library/std/src/os/mikros/syscalls.rs @@ -41,3 +41,8 @@ pub fn irq_register(irq: u8) -> Result<(), ()> { pub fn wake_new(pid: u64) -> Result<(), ()> { syscalls::wake_new(pid) } + +#[stable(feature = "mikros", since = "1.80.0")] +pub fn clear_exited(pid: u64) -> Result<(), ()> { + syscalls::clear_exited(pid) +} diff --git a/library/std/src/sys/pal/mikros/syscalls.rs b/library/std/src/sys/pal/mikros/syscalls.rs index fe733b37597..44402276da6 100644 --- a/library/std/src/sys/pal/mikros/syscalls.rs +++ b/library/std/src/sys/pal/mikros/syscalls.rs @@ -194,3 +194,7 @@ pub fn irq_register(irq: u8) -> Result<(), ()> { pub fn wake_new(pid: u64) -> Result<(), ()> { if syscall1(24, pid) == 0 { Ok(()) } else { Err(()) } } + +pub fn clear_exited(pid: u64) -> Result<(), ()> { + if syscall1(25, pid) == 0 { Ok(()) } else { Err(()) } +}