aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2021-11-29 22:03:00 +0000
committerBrooks Davis <brooks@FreeBSD.org>2021-11-29 22:04:43 +0000
commitcffb55f0f37c5bddd1d203bfbe281bea8ab62cda (patch)
tree30be682b5455642a2236d7b9067cdb61dcb82973
parent7fb006e7d61e9883344dfb20b277c3c015ab67b1 (diff)
downloadsrc-cffb55f0f37c5bddd1d203bfbe281bea8ab62cda.tar.gz
src-cffb55f0f37c5bddd1d203bfbe281bea8ab62cda.zip
syscalls: normalize exit
Declare the exit system call normally. This results in the implementation being named sys_exit rather than sys_sys_exit and being decalred as returning an int. Infact it does not return at all because exit1 does not, so add an __unreachable() to let the compiler know that. Reviewed by: kib, imp
-rw-r--r--sys/kern/kern_exit.c6
-rw-r--r--sys/kern/syscalls.master4
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 2f1cfb2a25d2..6d1cd5705f30 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -205,12 +205,12 @@ exit_onexit(struct proc *p)
/*
* exit -- death of process.
*/
-void
-sys_sys_exit(struct thread *td, struct sys_exit_args *uap)
+int
+sys_exit(struct thread *td, struct exit_args *uap)
{
exit1(td, uap->rval, 0);
- /* NOTREACHED */
+ __unreachable();
}
/*
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index cedadd9b94bf..693454c67eca 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -116,10 +116,10 @@
int nosys(void);
} syscall nosys_args int
1 AUE_EXIT STD|CAPENABLED {
- void sys_exit(
+ void exit(
int rval
);
- } exit sys_exit_args void
+ }
2 AUE_FORK STD|CAPENABLED {
int fork(void);
}