From nobody Fri Apr 29 23:12:37 2022 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 E32841ABD190; Fri, 29 Apr 2022 23:12:39 +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 4KqpDP6K8qz3w5k; Fri, 29 Apr 2022 23:12:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273957; 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=+Z6OxGCDWm4DAAUKWA46hddLKrDC0qazxScBeif6SRQ=; b=V05JFM1BBvq4j4KWrqpMGTFS5285mtJoNBA2OqJsbbDh+amjrzPu1129dkbLDv6g6aHR2I a8oR2ZaES20rF1FfNXslqKqEIf5zsOCohNIPjfF4VIJFi4OrJ8u34E4GCklB+SLKyddPsI UMrLH1zLxkqRY7nq2z7Oj4a2V8pzpWshJxbHed/N6VYubTSHqyyKA65NEOGvrzB0r+p9wC bYPu4A5CQFnN+FYeU7wT/WW7D0lMzJQERJLTnq3XeY5hXWA6HQIx9FhS9oR8Z/Stm2d9ou 0ul1jqNgpQym8L5SnsYctlH+pr4irkG0c4XuiGMLJwuiWaUR4o7/MC4TqshjBQ== 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 8B1BD15C7D; Fri, 29 Apr 2022 23:12:37 +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 23TNCbjW044895; Fri, 29 Apr 2022 23:12:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23TNCbiY044894; Fri, 29 Apr 2022 23:12:37 GMT (envelope-from git) Date: Fri, 29 Apr 2022 23:12:37 GMT Message-Id: <202204292312.23TNCbiY044894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c4ec1f6efb52 - stable/13 - libthr: Use TLS_TCB_* in _tcb_[cd]tor. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c4ec1f6efb52cd311b969d0a2018ca875c40f5e9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651273957; 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=+Z6OxGCDWm4DAAUKWA46hddLKrDC0qazxScBeif6SRQ=; b=i1bFalM0/ygPZLrmV4vuCJFPx7+R3x3yGhbYSeBLg2ZAmMkN9qL3I436gISkZHG6EtgBmI c+hVVKYEz7JCAcblPlBY0Sw7s0bxigm0LDmx2t0zqp2L0o/xwEyZM1fNQuo0In1QFpsP/u LtI5KpVWX9pVRIjFPq2weczYT577sdEoPUnE0Vyw0EpPTL/ZcQvppmx0YWhyu8h4jTpNS7 O+uts3Fw6LdM+9mA53YD7gUYu8wdeax+jbzu1gDKWX7vaDMLrS0AaaB9V+bVP1RyPXkaig igdxAJzM5jqAS7mIBRJmdCmM7/1UgKk0+OJ4vgxzP5QPjbPngKO5n/LroL5LrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651273957; a=rsa-sha256; cv=none; b=MqI3spuLRzwyXfYkIxNOTPTaXwh2hTypESyb9MHJaUW4pC7JR5pUtrSuBLk8gagLlOOa58 VBSX85xjB02CGdIh5QTSqCof+Uv11E3J3I/YCF6YD/oxKYtXv4D5nL2aIeGLiJ3UVB8/9M zoVtKfnKXNUoD6cqALHulmJegeKV/NQtR9Mb9C6MCRbHWNPPpblpzvajqxLUG8itRmNtf5 mjY5jCwrq2J/wYzAFUk56z8BlJc4h1uQFa8up1k+Qmt/Rkx47mc9Pnknrj/RPq1P2QNevA 8HZv6Z2aIQwuKyAK4IjEy5QMenvAB0bd9UAj1k/CYj7BkRLoOJMRA618Ne3tdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c4ec1f6efb52cd311b969d0a2018ca875c40f5e9 commit c4ec1f6efb52cd311b969d0a2018ca875c40f5e9 Author: John Baldwin AuthorDate: 2022-01-25 19:38:34 +0000 Commit: John Baldwin CommitDate: 2022-04-29 23:05:18 +0000 libthr: Use TLS_TCB_* in _tcb_[cd]tor. This matches libc and rtld in using the alignment (TLS_TCB_ALIGN) from machine/tls.h instead of hardcoding 16. Reviewed by: kib Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D34023 (cherry picked from commit 8de1a8131e42f96f8dcfbca9073896d249ff7d2c) --- lib/libthr/thread/thr_ctrdtr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libthr/thread/thr_ctrdtr.c b/lib/libthr/thread/thr_ctrdtr.c index 9d4301ef719f..9ce068072524 100644 --- a/lib/libthr/thread/thr_ctrdtr.c +++ b/lib/libthr/thread/thr_ctrdtr.c @@ -42,7 +42,7 @@ _tcb_ctor(struct pthread *thread, int initial) if (initial) tcb = _tcb_get(); else - tcb = _rtld_allocate_tls(NULL, sizeof(struct tcb), 16); + tcb = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, TLS_TCB_ALIGN); if (tcb) tcb->tcb_thread = thread; return (tcb); @@ -52,5 +52,5 @@ void _tcb_dtor(struct tcb *tcb) { - _rtld_free_tls(tcb, sizeof(struct tcb), 16); + _rtld_free_tls(tcb, TLS_TCB_SIZE, TLS_TCB_ALIGN); }