From nobody Sat Jan 04 03:57:47 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 4YQ6975C8Sz5j968; Sat, 04 Jan 2025 03:57:47 +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 4YQ6972JzCz4qd5; Sat, 4 Jan 2025 03:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735963067; 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=WI7YAW89Yv3T3uPvEI3qMPpuDtq3kT6VDp/vsZsHUEo=; b=KF3edEpMLUL2bNznnuT6dfkvWCZMglsDoXSOhw8636DklB+KaB3HqqKJRMPS5TZfsdHbHr Bg0D4HzsAdA4isMHsaI9u6KtY5kAiZDdCq94tVDVgGvEeIiEmjY/MUr9bk4LzU9gPwQ65P jHUd25yQCS6IsMIQ3/c9V+S2gac0/otY4NL0OC4q6CQiQQ7Ex9MwLbaU7MAKSPP2XPID6O KWlWil8qpNyI3eJAklJzmcQct7lA9471mNxQNGcEW4xFz+MYvGOP4qga6USKUIyoWz4HGj PXi6Wly6dOjxKz3t+6RkGmFnHpC4u97ZMTIwfbiTXXaDWbgm2QSTeKPbuVid9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735963067; 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=WI7YAW89Yv3T3uPvEI3qMPpuDtq3kT6VDp/vsZsHUEo=; b=dNup4C/6q7aFnGFwKDLMW5MTS31MDXhmljY60GDWWmhgL6NpSeHvHXaVe50EYToejKFHdf niqNTNNY3ZZzXsP7xIyONPiB5PaBVUpPrbOxzcN8Ou9HocE2TL1CzZs/ShR0PZdiDW60zr SlRexihb8jK8+fkv+nGtxMMqRFCDhLjBMwtdJHEAOEOHfig7v/p80o2Zju4kfOBoHqbm1s 6eSc1OJ16x8ItnhTec7lkd6dWVNczPzsXrCAe/Yp9A8kB2WOwLjZ+nm3RuuMfCKtKdTd4I jpWRPLQlSj3o7SfsPDTUktqAnsbDrt9OSuI3gAQGk0yYXFgyBJvzO6C1r6Le1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735963067; a=rsa-sha256; cv=none; b=agP5HfBl/dQ3UAmU1J9vHB3bmgWE8ITEN9Tz3ayzfjVWEBoZ9bM1Lj/tt64iWigpuyUxUB vnLgeHLE3faqoYJAzrgauCZfw5Q/N7xLToTpBNwL/ixV/aZ04nl/f1Qs8alSB1QsXwbalj 6b6CCOer84jSe+J2sVucgiaDePfi/6SFvMJy7OH29LZHFxwb7wcpOtVZbQTu16Zh5V+UE+ ArT3Du4MALifl9mfQ3eum88nrV01Y09WMy4zweXf2FTvzBiIJ5QxJbB3jEuWeOTH3p9MSN 2RI3yQd2fDEThawhmrm+XSG+i3I1aJ9cyB8LUvupQVHZUyMZcCRazXBxHFCzog== 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 4YQ6971tB4zcLd; Sat, 04 Jan 2025 03:57:47 +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 5043vlC5028336; Sat, 4 Jan 2025 03:57:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5043vlIE028333; Sat, 4 Jan 2025 03:57:47 GMT (envelope-from git) Date: Sat, 4 Jan 2025 03:57:47 GMT Message-Id: <202501040357.5043vlIE028333@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: 20f173fdc7c7 - stable/14 - thr_cancel.c: use testcancel() instead of manually expanding it 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: 20f173fdc7c70cc2185b8d38cd7ce997e78db795 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=20f173fdc7c70cc2185b8d38cd7ce997e78db795 commit 20f173fdc7c70cc2185b8d38cd7ce997e78db795 Author: Konstantin Belousov AuthorDate: 2024-12-21 17:55:39 +0000 Commit: Konstantin Belousov CommitDate: 2025-01-04 03:57:24 +0000 thr_cancel.c: use testcancel() instead of manually expanding it (cherry picked from commit a944e6d5c0c27c2a533486062497a40d8f0ae543) --- lib/libthr/thread/thr_cancel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c index 0e00c2c36086..7622e306f937 100644 --- a/lib/libthr/thread/thr_cancel.c +++ b/lib/libthr/thread/thr_cancel.c @@ -166,9 +166,8 @@ void _thr_cancel_leave(struct pthread *curthread, int maycancel) { curthread->cancel_point = 0; - if (__predict_false(SHOULD_CANCEL(curthread) && - !THR_IN_CRITICAL(curthread) && maycancel)) - _pthread_exit(PTHREAD_CANCELED); + if (maycancel) + testcancel(curthread); } void