diff options
author | dzwdz | 2023-08-29 23:35:03 +0200 |
---|---|---|
committer | dzwdz | 2023-08-29 23:35:03 +0200 |
commit | f71af249cfb9ca9eb0832cc46437b2c5cb7bb217 (patch) | |
tree | dcc5403d304547da397644b9d43e2bf8c67a0b3e /src/libc | |
parent | dd385a413c92d53a1f792011e1029d7d68e19c6c (diff) |
kernel: remove _sys_await, emulate it in libc
Diffstat (limited to 'src/libc')
-rw-r--r-- | src/libc/compat.c | 9 | ||||
-rw-r--r-- | src/libc/include/camellia/compat.h | 2 | ||||
-rw-r--r-- | src/libc/syscall.c | 4 |
3 files changed, 11 insertions, 4 deletions
diff --git a/src/libc/compat.c b/src/libc/compat.c index 3ec47f9..fdf24bb 100644 --- a/src/libc/compat.c +++ b/src/libc/compat.c @@ -18,3 +18,12 @@ long c0_fs_respond(void *buf, long ret, int flags) { h = -1; return ret; } + +/* old syscall */ +long _sys_await(void) { + struct sys_wait2 res; + if (_sys_wait2(-1, 0, &res) < 0) { + return ~0; + } + return res.status; +} diff --git a/src/libc/include/camellia/compat.h b/src/libc/include/camellia/compat.h index a7c6f1f..8b2efa1 100644 --- a/src/libc/include/camellia/compat.h +++ b/src/libc/include/camellia/compat.h @@ -4,3 +4,5 @@ /* c0 - fs_wait returning a handle */ long c0_fs_wait(char *buf, long len, struct ufs_request *res); long c0_fs_respond(void *buf, long ret, int flags); + +long _sys_await(void); diff --git a/src/libc/syscall.c b/src/libc/syscall.c index 5196683..b920e14 100644 --- a/src/libc/syscall.c +++ b/src/libc/syscall.c @@ -10,10 +10,6 @@ _Noreturn void _sys_exit(long ret) { __builtin_unreachable(); } -long _sys_await(void) { - return _syscall(_SYS_AWAIT, 0, 0, 0, 0, 0); -} - long _sys_fork(int flags, hid_t __user *fs_front) { return _syscall(_SYS_FORK, (long)flags, (long)fs_front, 0, 0, 0); } |