From nobody Sat Dec 28 17:20:22 2024 X-Original-To: dev-commits-src-main@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 4YL8JR0CdGz5jfKT; Sat, 28 Dec 2024 17:20:23 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YL8JQ5Q8zz4mSD; Sat, 28 Dec 2024 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735406422; 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=sQw7msnOPGKlqjlicGv6sopGgJECbtcGR1epqREsfN0=; b=KEOwgPSOJJKQpcpUK0O0LnBHaO8rRLP5Z2ttwtg0rmI5Ljg4ln7W7hAuBEXlytnYQVPfG9 Wi5HfTAccRQGIhwalzTitlQmHm5yx57cd9q5JPg0XoSyMquqkpCpjrPFTAs9ZeQtGQ8GkT PlJyfvUP1N/rllUN6BtnGfJfkKS7H01JGTNoODDUZltdjvjGk0FZ3q/tCdcgH18pC6xNEY LboDO2aAxDuPpQ14wkki+Q12sxMe1riV2i1PDk88etRTEu9QAHdnMrOzc/CGTmCj2DH/5D tO6G6kCHmYefY6Uv6FlwvvESzTG+6lUSnG/8ZCrv/bWaZy4c2Tk43TSDiwLNdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735406422; 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=sQw7msnOPGKlqjlicGv6sopGgJECbtcGR1epqREsfN0=; b=R6TTvrbCbn+/4WUiBUcdbenNLtMA80hiMYD4NdBMml/0hxKhcOrCDyF//tAQthFHtW5bwP 7rMpBAP1YD0d3VysnsSmdXDXZci9qW5rGlrz31pLWcMN5yow0EnxI/2dljDMtSeBZPnCvR o9IEPwXD89KU3whGh7VLCYzqs+AMwK4r88hY1YEgLVBPPneXEYdkCMBBSSgidnAGaqJcKd ywHh78ReDyTldU2JLDkCnZHAwD0TFypwXCAanel44dMipvJ6YWVElJBT9N90dsSLO9rffq /6Vq+7P6yrLsM5pOp8Z5IJ0TsawWwYFYH9Br30aM+0I7p2kpI24az0XXMdUhLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735406422; a=rsa-sha256; cv=none; b=TGV5x1sq57cmfFnyT8kqwt7H9T84O9CllmdgaD9X1pf8Yy5nxiYu/aGfCkw4TuFjXrZasd Mr7jzf+WbFnMd6aGWGeSt3i5GqueCuu8HND1vCRHrnsOcefURQKOfntMY1xHFrKlhgM43M aByW/fw7p1Si9z0/tKebGDi4jgt6bh1wlz9+Vg69bHgNe1j6uR97XtsVrYN7f+D6ekMPGx WSWqqa87167M+xFvfSvBVrPtT1AJTI+Dhe/bhl/2chFqAYA02CK/ajh3GpYaVvgYcOAJku MS7dT3V2gXTXMhk7MSw1bbCcsFgFAUReCF2PbT4YFGNjVgxAO5CKIn/jflcM0Q== 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 4YL8JQ4GvpzZ68; Sat, 28 Dec 2024 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BSHKMcK061885; Sat, 28 Dec 2024 17:20:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BSHKMoC061882; Sat, 28 Dec 2024 17:20:22 GMT (envelope-from git) Date: Sat, 28 Dec 2024 17:20:22 GMT Message-Id: <202412281720.4BSHKMoC061882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e32308efa215 - main - thr_sig.c: style List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e32308efa215868d98036c30f73c98ebf67e03d4 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e32308efa215868d98036c30f73c98ebf67e03d4 commit e32308efa215868d98036c30f73c98ebf67e03d4 Author: Konstantin Belousov AuthorDate: 2024-12-22 20:35:26 +0000 Commit: Konstantin Belousov CommitDate: 2024-12-28 17:01:27 +0000 thr_sig.c: style Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48200 --- lib/libthr/thread/thr_sig.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index b953c430158c..e69641d8e1b5 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -185,8 +185,7 @@ thr_remove_thr_signals(const sigset_t *set, sigset_t *newset) } static void -sigcancel_handler(int sig __unused, - siginfo_t *info __unused, ucontext_t *ucp) +sigcancel_handler(int sig __unused, siginfo_t *info __unused, ucontext_t *ucp) { struct pthread *curthread = _get_curthread(); int err; @@ -354,7 +353,7 @@ check_cancel(struct pthread *curthread, ucontext_t *ucp) * on getting a signal before it agrees to return. */ if (curthread->cancel_point) { - if (curthread->in_sigsuspend && ucp) { + if (curthread->in_sigsuspend && ucp != NULL) { SIGADDSET(ucp->uc_sigmask, SIGCANCEL); curthread->unblock_sigcancel = 1; _thr_send_sig(curthread, SIGCANCEL); @@ -365,8 +364,8 @@ check_cancel(struct pthread *curthread, ucontext_t *ucp) * asynchronous cancellation mode, act upon * immediately. */ - _pthread_exit_mask(PTHREAD_CANCELED, - ucp? &ucp->uc_sigmask : NULL); + _pthread_exit_mask(PTHREAD_CANCELED, ucp != NULL ? + &ucp->uc_sigmask : NULL); } } @@ -405,9 +404,8 @@ check_suspend(struct pthread *curthread) { uint32_t cycle; - if (__predict_true((curthread->flags & - (THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED)) - != THR_FLAGS_NEED_SUSPEND)) + if (__predict_true((curthread->flags & (THR_FLAGS_NEED_SUSPEND | + THR_FLAGS_SUSPENDED)) != THR_FLAGS_NEED_SUSPEND)) return; if (curthread == _single_thread) return; @@ -664,7 +662,7 @@ _thr_sigmask(int how, const sigset_t *set, sigset_t *oset) } int -_sigsuspend(const sigset_t * set) +_sigsuspend(const sigset_t *set) { sigset_t newset; @@ -672,7 +670,7 @@ _sigsuspend(const sigset_t * set) } int -__thr_sigsuspend(const sigset_t * set) +__thr_sigsuspend(const sigset_t *set) { struct pthread *curthread; sigset_t newset; @@ -698,7 +696,7 @@ __thr_sigsuspend(const sigset_t * set) int _sigtimedwait(const sigset_t *set, siginfo_t *info, - const struct timespec * timeout) + const struct timespec *timeout) { sigset_t newset; @@ -713,7 +711,7 @@ _sigtimedwait(const sigset_t *set, siginfo_t *info, */ int __thr_sigtimedwait(const sigset_t *set, siginfo_t *info, - const struct timespec * timeout) + const struct timespec *timeout) { struct pthread *curthread = _get_curthread(); sigset_t newset;