From nobody Mon Nov 29 22:05:34 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 78CCF18C7C01; Mon, 29 Nov 2021 22:05:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J2ztk6xvWz3GT3; Mon, 29 Nov 2021 22:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9739B2699; Mon, 29 Nov 2021 22:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1ATM5YCB075688; Mon, 29 Nov 2021 22:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1ATM5Ykt075687; Mon, 29 Nov 2021 22:05:34 GMT (envelope-from git) Date: Mon, 29 Nov 2021 22:05:34 GMT Message-Id: <202111292205.1ATM5Ykt075687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: cffb55f0f37c - main - syscalls: normalize exit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cffb55f0f37c5bddd1d203bfbe281bea8ab62cda Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638223535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2AvrVAaHaaNWts70jC7LtWI8DeRbvEe8iLewESic2Oo=; b=yn5KB24JaduMuKO1DDLEPfgiyZiSiGPEOhfbVPCBD0AFzTKiaIOdLximXR8l960lRu/rpk Hxg7hhNjBmkT/4yuEmFuNHkIu58fwHJvDywMRZvsOlwMiv4tik3HPdijTPhcoN1MERjEbr KOPA6qz3o07AmDpf2GwdeubUNsajoUiF0Qvf6erdoxaWG0+JIBuzush29RCOED4/NyT7I2 64tchdo3OnLxeDyLK8C3Kpym8DBggL9KRx8bPThruoAsox4qRKK/G3M/KYX+nv13g6DqT2 XmnkyqiKaoO9MCBZ8Q+9cCuzO0WKYsklwXm9cqLSoXgb+34MZNhhqlzA3g4JNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638223535; a=rsa-sha256; cv=none; b=IyxsyfkG64GhiVcKvolrc+ikF3vwq1UTpkOA8dnZF6JHjbPThv1Usdn505tMjNe++SI9jY sVxAt0kFDAA55PfOS5NZayzWOp4lLxSY6dm0XwzqNLtZWF41pRjDDNKYYUEylCiZEdN5kf IHaW4xkUR+CmWDwRNCGb2qBHcKbSJMHe09QnWy+XycJGk9DCxGvEdTGuIyQq4XRCConHzG vp1tvw+ZsBAO4li6OtYi9WrzhF0PrUD/CoSZ9KEyuCl4lyvoheV6hfTVyjSxU8Fj3cqSCi +qPWO4ILGhk2Ww9Vd+2sPxYJMTt/u52B1tYIjycKA+g0apz9AoNKqjGR0P+Njg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cffb55f0f37c5bddd1d203bfbe281bea8ab62cda commit cffb55f0f37c5bddd1d203bfbe281bea8ab62cda Author: Brooks Davis AuthorDate: 2021-11-29 22:03:00 +0000 Commit: Brooks Davis 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); }