git: cffb55f0f37c - main - syscalls: normalize exit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 Nov 2021 22:05:34 UTC
The branch main has been updated by brooks:
URL: https://cgit.FreeBSD.org/src/commit/?id=cffb55f0f37c5bddd1d203bfbe281bea8ab62cda
commit cffb55f0f37c5bddd1d203bfbe281bea8ab62cda
Author: Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-29 22:03:00 +0000
Commit: Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-29 22:04:43 +0000
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
---
sys/kern/kern_exit.c | 6 +++---
sys/kern/syscalls.master | 4 ++--
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);
}