From nobody Fri May 02 07:31:17 2025 X-Original-To: dev-commits-src-branches@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 4ZpjK22GpVz5vH2q; Fri, 02 May 2025 07:31:18 +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 4ZpjK209RRz3qlC; Fri, 02 May 2025 07:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746171078; 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=mBvtryH7RI13b3aovNUx0qJOADCjV4IzYLZArc2GkXc=; b=mW2hk5h3xV4gRwz/Umzx975BSy20T/gGT+KPHWscymEOwY7udNLMmBSeu/FnLmlXTsoMwR vuWmWTXF5uzxCpZkc/IHSRPVH2Nfx6lrUw/EfbAv1IELmDjvW9RdO6rS3THEXhpaW9LG9r 5UhGm1jwJame2kKayyWvqV+rkjnv8wdqnDVio/nZupA8YfUPkFRNITCt1pn4h4FB5wSSPs BIXn3Mv9LuwBYm2/5ps6oUWJJmbsSDKd/FDmzVi8wkpFT21LPi+JorAnC0/sNGipWrjafN 26DhvfOJwkmaErOEdvUHku38bNglsirf9G0T+oNFEsjD4PMeUZ+P1bhjklOmmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746171078; 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=mBvtryH7RI13b3aovNUx0qJOADCjV4IzYLZArc2GkXc=; b=FqTVnCXbTxy9IxcjUPrfmEMykRBpToAT+Hmh8HjSmgvJ/ynG9Tmw4zBSZCaiXfALDpFWQP N6RZBuUJ8fG9HG20siViXEOpXQajcddFHByDitPSg/yE51skwyxYsuA9yFO7W0hQXLjUmp rm2MO7aoI51a0M3WAXdYVf3Dta5eEp0gT/gVAnVUed9wvwly6dpzgzL8m/MGcughkscbYj mCX74y1V829ecIl61UaIBTJ6k/2rAZDVKPPkf1D8Yu0ytqaOjjw/TttJWXCSij3+CBOIPt r8WCALEMB4Nr0mwH5m/xjjgkDM3F5XZAwJCQ7tOvEDeJTiTk75BrAArpnRF6lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746171078; a=rsa-sha256; cv=none; b=GObfgJdGRdVwHUTbliBV9cONK2m9rw42ncQEd3F10U/SX3QKY0S5hrQh+dyIYnUvIeNmYj 3ShAilJKSAZcl0RsHRArsH5YodTrKhmKqdd17XhA0FEmSJY8BNryO2B/X2Rxmg7otPSlGB 9zIBMnrmt2s+ZA7EzK0LFem4JTwWb7EnttE1kBV7g9pBf1NJZeUTYAOdRvGx6ZXTn3Y+rV asz/8tmSVrINnc7FfKVIbREPhKUROzs3jKvM65wsMWy4GUM+djz+VBrdqUFme+BxuLcEF0 HD33UXCCcUF8nWpWQDY5zSm/DjbaFC8bRI96mBp5HxJFZTAljsiXekqX7DoU4A== 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 4ZpjK16cr7z13l6; Fri, 02 May 2025 07:31:17 +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 5427VH6B075895; Fri, 2 May 2025 07:31:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5427VHv0075878; Fri, 2 May 2025 07:31:17 GMT (envelope-from git) Date: Fri, 2 May 2025 07:31:17 GMT Message-Id: <202505020731.5427VHv0075878@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: 85192b37a3f1 - stable/14 - libthr: add __thr_aligned_alloc_offset() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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: 85192b37a3f1af0dd6a7215b50cc6b6e2c5ccac4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=85192b37a3f1af0dd6a7215b50cc6b6e2c5ccac4 commit 85192b37a3f1af0dd6a7215b50cc6b6e2c5ccac4 Author: Konstantin Belousov AuthorDate: 2025-04-24 21:23:06 +0000 Commit: Konstantin Belousov CommitDate: 2025-05-02 07:30:51 +0000 libthr: add __thr_aligned_alloc_offset() (cherry picked from commit 846229d60b4fd6def666ce32cfc475ed96aabaf3) --- lib/libthr/thread/thr_malloc.c | 13 +++++++++++++ lib/libthr/thread/thr_private.h | 1 + 2 files changed, 14 insertions(+) diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c index dbc9e39e3c28..e973a00427f3 100644 --- a/lib/libthr/thread/thr_malloc.c +++ b/lib/libthr/thread/thr_malloc.c @@ -120,6 +120,19 @@ __thr_malloc(size_t nbytes) return (res); } +void * +__thr_aligned_alloc_offset(size_t align, size_t size, size_t offset) +{ + struct pthread *curthread; + void *res; + + curthread = _get_curthread(); + thr_malloc_lock(curthread); + res = __crt_aligned_alloc_offset(align, size, offset); + thr_malloc_unlock(curthread); + return (res); +} + void * __thr_realloc(void *cp, size_t nbytes) { diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index b34c084ad04d..a81452e2a251 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -1012,6 +1012,7 @@ void __thr_pshared_destroy(void *key) __hidden; void __thr_pshared_atfork_pre(void) __hidden; void __thr_pshared_atfork_post(void) __hidden; +void *__thr_aligned_alloc_offset(size_t align, size_t size, size_t offset); void *__thr_calloc(size_t num, size_t size); void __thr_free(void *cp); void *__thr_malloc(size_t nbytes);