From 681470cf98a6e512627e67620b39c090b9e98aba Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 25 Sep 2023 00:16:12 +0200 Subject: kernel: remove _sys_filicide (made redundant by _sys_intr) --- src/kernel/syscalls.c | 1 - src/libc/compat.c | 5 ++++- src/libc/include/camellia/compat.h | 1 + src/libc/syscall.c | 4 ---- src/libk/include/camellia/syscalls.h | 2 -- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index edc74bb..c5a2f50 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -490,7 +490,6 @@ long _syscall(long num, long a, long b, long c, long d, long e) { break; case _SYS_MEMFLAG: _sys_memflag((userptr_t)a, b, c); break; case _SYS_PIPE: _sys_pipe((userptr_t)a, b); break; case _SYS_SLEEP: _sys_sleep(a); - break; case _SYS_FILICIDE: _sys_filicide(); break; case _SYS_INTR: _sys_intr((userptr_t)a, b); break; case _SYS_INTR_SET: _sys_intr_set((userptr_t)a); break; case _SYS_GETPID: _sys_getpid(); diff --git a/src/libc/compat.c b/src/libc/compat.c index c7aab63..459a0aa 100644 --- a/src/libc/compat.c +++ b/src/libc/compat.c @@ -17,7 +17,6 @@ long c0_fs_respond(void *buf, long ret, int flags) { return ret; } -/* old syscall */ long _sys_await(void) { struct sys_wait2 res; if (_sys_wait2(-1, 0, &res) < 0) { @@ -25,3 +24,7 @@ long _sys_await(void) { } return res.status; } + +void _sys_filicide(void) { + _sys_intr("kill", 4); +} diff --git a/src/libc/include/camellia/compat.h b/src/libc/include/camellia/compat.h index 8b2efa1..3b0ba4a 100644 --- a/src/libc/include/camellia/compat.h +++ b/src/libc/include/camellia/compat.h @@ -6,3 +6,4 @@ 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); +void _sys_filicide(void); diff --git a/src/libc/syscall.c b/src/libc/syscall.c index 782b2fe..8142028 100644 --- a/src/libc/syscall.c +++ b/src/libc/syscall.c @@ -66,10 +66,6 @@ void _sys_sleep(long ms) { return (void)_syscall(_SYS_SLEEP, ms, 0, 0, 0, 0); } -void _sys_filicide(void) { - return (void)_syscall(_SYS_FILICIDE, 0, 0, 0, 0, 0); -} - int _sys_intr(const char __user *msg, size_t len) { return (int)_syscall(_SYS_INTR, (long)msg, (long)len, 0, 0, 0); } diff --git a/src/libk/include/camellia/syscalls.h b/src/libk/include/camellia/syscalls.h index c7e2f10..6d9286b 100644 --- a/src/libk/include/camellia/syscalls.h +++ b/src/libk/include/camellia/syscalls.h @@ -15,7 +15,6 @@ #define _SYS_MEMFLAG 13 #define _SYS_PIPE 14 #define _SYS_SLEEP 15 -#define _SYS_FILICIDE 16 #define _SYS_INTR 17 #define _SYS_INTR_SET 18 #define _SYS_GETPID 19 @@ -74,7 +73,6 @@ long _sys_pipe(hid_t __user user_ends[2], int flags); void _sys_sleep(long ms); -void _sys_filicide(void); int _sys_intr(const char __user *msg, size_t len); void _sys_intr_set(void __user *ip); -- cgit v1.2.3