summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-24 00:03:55 +0200
committerAnton Kling <anton@kling.gg>2024-06-24 00:04:21 +0200
commit90a8be18547040cab8c395c64d681be1f95ec517 (patch)
tree9fc71f5dad4442ba99c459233027cdc5b98f9bdd
parentf37e21114750c066a1b9f9d8e789185746fd1c45 (diff)
Kernel: Purge unused/bad syscalls
-rw-r--r--kernel/cpu/syscall.c64
-rw-r--r--userland/libc/include/syscall.h19
2 files changed, 24 insertions, 59 deletions
diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c
index 897703a..2e7bd61 100644
--- a/kernel/cpu/syscall.c
+++ b/kernel/cpu/syscall.c
@@ -151,52 +151,26 @@ int syscall_setsockopt(int socket, int level, int option_name,
}
int (*syscall_functions[])() = {
- (void(*))syscall_open,
- (void(*))syscall_mread,
- (void(*))syscall_write,
- (void(*))syscall_pread,
- (void(*))syscall_pwrite,
- (void(*))syscall_fork,
- (void(*))syscall_exec,
- (void(*))syscall_getpid,
- (void(*))syscall_exit,
- (void(*))syscall_wait,
- (void(*))syscall_brk,
- (void(*))syscall_sbrk,
- (void(*))syscall_pipe,
- (void(*))syscall_dup2,
- (void(*))syscall_close,
- (void(*))syscall_openpty,
- (void(*))syscall_poll,
- (void(*))syscall_mmap,
- (void(*))syscall_accept,
- (void(*))syscall_bind,
- (void(*))syscall_socket,
- (void(*))syscall_shm_open,
- (void(*))syscall_ftruncate,
- (void(*))syscall_fstat,
- (void(*))syscall_msleep,
- (void(*))syscall_uptime,
- (void(*))syscall_mkdir,
- (void(*))syscall_recvfrom,
- (void(*))syscall_sendto,
- (void(*))syscall_kill,
- (void(*))syscall_sigaction,
- (void(*))syscall_chdir,
- (void(*))syscall_getcwd,
- (void(*))syscall_isatty,
+ (void(*))syscall_open, (void(*))syscall_mread,
+ (void(*))syscall_write, (void(*))syscall_pread,
+ (void(*))syscall_pwrite, (void(*))syscall_fork,
+ (void(*))syscall_exec, (void(*))syscall_getpid,
+ (void(*))syscall_exit, (void(*))syscall_wait,
+ (void(*))syscall_brk, (void(*))syscall_sbrk,
+ (void(*))syscall_pipe, (void(*))syscall_dup2,
+ (void(*))syscall_close, (void(*))syscall_openpty,
+ (void(*))syscall_poll, (void(*))syscall_mmap,
+ (void(*))syscall_accept, (void(*))syscall_bind,
+ (void(*))syscall_socket, (void(*))syscall_shm_open,
+ (void(*))syscall_ftruncate, (void(*))syscall_fstat,
+ (void(*))syscall_msleep, (void(*))syscall_uptime,
+ (void(*))syscall_mkdir, (void(*))syscall_recvfrom,
+ (void(*))syscall_sendto, (void(*))syscall_kill,
+ (void(*))syscall_sigaction, (void(*))syscall_chdir,
+ (void(*))syscall_getcwd, (void(*))syscall_isatty,
(void(*))syscall_randomfill,
- (void(*))syscall_outw,
- (void(*))syscall_inl,
- (void(*))syscall_outl,
- (void(*))syscall_map_frames,
- (void(*))syscall_virtual_to_physical,
- (void(*))syscall_install_irq,
- (void(*))syscall_tmp_handle_packet,
- (void(*))syscall_munmap,
- (void(*))syscall_open_process,
- (void(*))syscall_lseek,
- (void(*))syscall_connect,
+ (void(*))syscall_munmap, (void(*))syscall_open_process,
+ (void(*))syscall_lseek, (void(*))syscall_connect,
(void(*))syscall_setsockopt,
};
diff --git a/userland/libc/include/syscall.h b/userland/libc/include/syscall.h
index 32a9e81..1f68b60 100644
--- a/userland/libc/include/syscall.h
+++ b/userland/libc/include/syscall.h
@@ -40,20 +40,11 @@
#define SYS_GETCWD 32
#define SYS_ISATTY 33
#define SYS_RANDOMFILL 34
-
-#define SYS_OUTW 35
-#define SYS_INL 36
-#define SYS_OUTL 37
-#define SYS_MAP_FRAMES 38
-#define SYS_VIRTUAL_TO_PHYSICAL 39
-#define SYS_INSTALL_IRQ 40
-#define SYS_TMP_KERNEL_HANDLE_PACKET 41
-
-#define SYS_MUNMAP 42
-#define SYS_OPEN_PROCESS 43
-#define SYS_LSEEK 44
-#define SYS_CONNECT 45
-#define SYS_SETSOCKOPT 46
+#define SYS_MUNMAP 35
+#define SYS_OPEN_PROCESS 36
+#define SYS_LSEEK 37
+#define SYS_CONNECT 38
+#define SYS_SETSOCKOPT 39
int syscall(uint32_t eax, uint32_t ebx, uint32_t ecx, uint32_t edx,
uint32_t esi, uint32_t edi);