Add wake_new syscall and wake new processes after setting STDIO
This commit is contained in:
parent
5ccb37a3f7
commit
cc1450e308
@ -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)
|
||||
}
|
||||
|
@ -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 }))
|
||||
}
|
||||
|
||||
|
@ -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(()) }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user