diff options
author | dzwdz | 2021-08-18 20:23:59 +0200 |
---|---|---|
committer | dzwdz | 2021-08-18 20:23:59 +0200 |
commit | c0a5b44bc8261dec6d4ffaadb244ecbff962719b (patch) | |
tree | 64043f4c174b1695541f4de2ee845681b14e300e /src/init/syscalls.c | |
parent | 349420c51fe05bfb23b6eb4d30aa1aad034d3c33 (diff) |
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).
Diffstat (limited to 'src/init/syscalls.c')
-rw-r--r-- | src/init/syscalls.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |