From a8efd4d1b3b43a5762f87befe22dd6e1cda73373 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Mon, 29 Nov 2021 22:03:00 +0000 Subject: [PATCH] syscalls: make syscall and __syscall SYSMUX Rather than combining the declearation of nosys with the registration of SYS_syscall, declare syscall(2) and __syscall(2) with the new SYSMUX type in syscalls.master and declare nosys directly. This eliminates the last use of syscall aliases in the tree. Reviewed by: kib, imp --- sys/kern/syscalls.master | 18 ++++++++++++------ sys/sys/sysent.h | 6 ++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 96541023ec2..92cc727f22c 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -114,9 +114,12 @@ #include %%ABI_HEADERS%% -0 AUE_NULL STD { - int nosys(void); - } syscall nosys_args int +0 AUE_NULL SYSMUX { + int syscall( + int number, + ... + ); + } 1 AUE_EXIT STD|CAPENABLED { void exit( int rval @@ -1194,9 +1197,12 @@ off_t pos ); } -198 AUE_NULL NOPROTO { - int nosys(void); - } __syscall __syscall_args int +198 AUE_NULL SYSMUX { + int __syscall( + int64_t number, + ... + ); + } 199 AUE_LSEEK COMPAT6|CAPENABLED { off_t lseek( int fd, diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index fc678d49750..e0b06792703 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -192,6 +192,12 @@ extern struct sysentvec aout_sysvec; extern struct sysent sysent[]; extern const char *syscallnames[]; +struct nosys_args { + register_t dummy; +}; + +int nosys(struct thread *, struct nosys_args *); + #define NO_SYSCALL (-1) struct module;