From 6cbe58797781cb8514a62bb3ab0e3e8a5d58bce2 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 31 Aug 2023 01:06:41 +0200 Subject: kernel: add _sys_getprocfs in place of HANDLE_PROCFS This makes the side-effects more explicit, and feels less hacky than `HANDLE_PROCFS`. I don't think accessing a handle alone should have side-effects, even if it's a "special" one. --- src/libk/include/camellia/flags.h | 1 - src/libk/include/camellia/syscalls.h | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/libk') diff --git a/src/libk/include/camellia/flags.h b/src/libk/include/camellia/flags.h index f4c54fe..bc34616 100644 --- a/src/libk/include/camellia/flags.h +++ b/src/libk/include/camellia/flags.h @@ -32,4 +32,3 @@ /* special handles */ #define HANDLE_NULLFS -2 -#define HANDLE_PROCFS -3 diff --git a/src/libk/include/camellia/syscalls.h b/src/libk/include/camellia/syscalls.h index b7e60a0..58898d4 100644 --- a/src/libk/include/camellia/syscalls.h +++ b/src/libk/include/camellia/syscalls.h @@ -21,6 +21,7 @@ #define _SYS_GETPID 19 #define _SYS_GETPPID 20 #define _SYS_WAIT2 21 +#define _SYS_GETPROCFS 22 #define _SYS_EXECBUF 100 #define _SYS_DEBUG_KLOG 101 @@ -81,6 +82,8 @@ uint32_t _sys_getppid(void); int _sys_wait2(int pid, int flags, struct sys_wait2 __user *out); +hid_t _sys_getprocfs(int flags); + /* see shared/execbuf.h */ long _sys_execbuf(void __user *buf, size_t len); -- cgit v1.2.3