summaryrefslogtreecommitdiff
path: root/src/libc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libc')
-rw-r--r--src/libc/compat.c9
-rw-r--r--src/libc/include/camellia/compat.h2
-rw-r--r--src/libc/syscall.c4
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);
}