From nobody Tue Jan 21 00:26:43 2025 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 4YcSgm50CKz5lCD4; Tue, 21 Jan 2025 00:26:44 +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 4YcSgm0chyz3MSB; Tue, 21 Jan 2025 00:26:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737419204; 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=I+qrGsoaVxUnaTwrUZU/Z33NUkG7PMlD8yf1ioRf3Ts=; b=lfImpb3FwzSnkxBxL/dksvAMIwwQMi1x3f+BwzOhHAnhoGLbVlXp1/eDcTc5o7eCBCexm2 +XuSrTgCw+IwLkzoeDu6Mz8usZKHeHMi9OfpQaO4fXNdk8uk2MsedGgkLIZOsz8hFDs9DP FCChwm4Tiol4+frp7LMW0aeuOophlvCLkj2BeDzcm2cDvy1HZBkGWiBo+5IKReycRJ61IL eZ5LGR9XaEFtFGEIpRfYWQzbxVIE8wUs8BmbH39JFtSIuhihHOaZVPjdjI3rBAVrbb77PI E9OYIC8zwST48ex7/zKAw9Ll5ODBwcfRTGcbbUUxRK+EpL9lxWCpWUw3B1JbOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737419204; 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=I+qrGsoaVxUnaTwrUZU/Z33NUkG7PMlD8yf1ioRf3Ts=; b=O83KDaxzpkJxeM+jxDJrAXprKU5akTJBaneCoXrptGvmOKkRLG7mwuJiWXqq8RrY2A0xxJ 8lL4sEYIOd/4d6R1w3MDbNHm7CXD0kwjbmIQxxRm2hwM08GfEor32C1SpbPKUCrSh2eOAZ RRjZ9NnpOhjsdzAa/u0Hzuu9emILGqPIY3eM+zj95OY1yimq0wa+Fc2XtPNvAjfAGkbHQv wtMahKVqomcuzyx1pTyGvCza6TPlTVDkzxfakPJrReoVQKO7jWCg1Gbrh1u8iBi+6Lrwdb U5d3mti+OyNxPWLZtlcIGvj15bgSPsMN5JyniutVOrHDhq4O72CyBl9Pqq6jcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737419204; a=rsa-sha256; cv=none; b=XpO9DMq2xQsM4EircAcu13rLWdE/6apF286HwTtRY73GPq2uJKR+eZ3tftLSyvu3p5JBVz YMUW09LT3tPbWYB16FZ49UihbNpGAfPebt96xoVkXNwD9eS8L4B65Ogwk/xEYB+Jq+Pnuc MCScAIhjfxxJbEBJPzzsPyh+lxvDW2pSNl7yDh7TSERII2l/pxS7i4BuV5WAlXPlXrQTT/ mOrot1RAlYR0LYBD/aQ3/2h0M1cwGlVLYKTsuq65awmpeY42IvIOpLGNvfrE3lnvPOSfHN O6UvWL2IYRWXxMMIdD043Qq23UKkXCz9PucV9Sofy8jLANTprpIDyX7VjV5tzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YcSgm04CmzkWK; Tue, 21 Jan 2025 00:26:44 +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 50L0Qh8r013327; Tue, 21 Jan 2025 00:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50L0Qh0f013324; Tue, 21 Jan 2025 00:26:43 GMT (envelope-from git) Date: Tue, 21 Jan 2025 00:26:43 GMT Message-Id: <202501210026.50L0Qh0f013324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1a085ee97343 - stable/14 - pthread_create(): style 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a085ee97343c3938a12a7813421cec05768945b Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1a085ee97343c3938a12a7813421cec05768945b commit 1a085ee97343c3938a12a7813421cec05768945b Author: Konstantin Belousov AuthorDate: 2025-01-14 23:32:06 +0000 Commit: Konstantin Belousov CommitDate: 2025-01-21 00:24:55 +0000 pthread_create(): style (cherry picked from commit 02703de8bcae3b45e6d96e8467d5fa512d62cc3d) --- lib/libthr/thread/thr_create.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 4de9bd84ca5b..2ae7cf0cd7b2 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -146,7 +146,7 @@ _pthread_create(pthread_t * __restrict thread, _thr_stack_fix_protection(new_thread); /* Return thread pointer eariler so that new thread can use it. */ - (*thread) = new_thread; + *thread = new_thread; if (SHOULD_REPORT_EVENT(curthread, TD_CREATE) || cpusetp != NULL) { THR_THREAD_LOCK(curthread, new_thread); locked = 1; @@ -226,8 +226,8 @@ _pthread_create(pthread_t * __restrict thread, THR_THREAD_UNLOCK(curthread, new_thread); } out: - if (ret) - (*thread) = 0; + if (ret != 0) + *thread = NULL; return (ret); }