From c0a5b44bc8261dec6d4ffaadb244ecbff962719b Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 18 Aug 2021 20:23:59 +0200 Subject: await() 1: wait for child to die, without message passing The length is a int, because the syscall will have a signed output. A negative return value will mean an error (such as when it gets called by a childless process). --- src/init/syscalls.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/init/syscalls.c') diff --git a/src/init/syscalls.c b/src/init/syscalls.c index d0da33e..4bbd83a 100644 --- a/src/init/syscalls.c +++ b/src/init/syscalls.c @@ -12,6 +12,10 @@ int _syscall_fork() { return _syscall(_SYSCALL_FORK, 0, 0, 0); } +int _syscall_await(char *buf, int *len) { + return _syscall(_SYSCALL_AWAIT, (int)buf, (int)len, 0); +} + int _syscall_debuglog(const char *msg, size_t len) { return _syscall(_SYSCALL_DEBUGLOG, (int)msg, len, 0); } -- cgit v1.2.3