From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2012) id 03B903858CD1; Mon, 18 Mar 2024 17:50:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03B903858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710784220; bh=dGGUzuw254JBET8bbq8UibYkR3dp0dYluwg69rkWLTA=; h=From:To:Subject:Date:From; b=DkWo6AMYgxgAtnZZbPPwc88PwNXB01AsQ138tR39IcSGJ4XknA97PEzanYSqZpFKj U3ImGu5hID8adRCIv0YO9vpGnXgr8PhBP6fvts158sYsM9QJImNvwpdlyHJA30Qf2w 7ZdkumehA7qCFJ/xTX19BG5fpVt6kn/vBf7USRdI= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Arjun Shankar To: glibc-cvs@sourceware.org Subject: =?utf-8?q?=5Bglibc/release/2=2E35/master=5D_make_=E2=80=98struct_pthread?= =?utf-8?q?=E2=80=99_a_complete_type?= X-Act-Checkin: glibc X-Git-Author: Paul Eggert X-Git-Refname: refs/heads/release/2.35/master X-Git-Oldrev: a24adf3572ad23fc5098d4cc62ff821cff1ef3c5 X-Git-Newrev: 3cd02612e831500dacc8d731f23a52aae01cbc39 Message-Id: <20240318175020.03B903858CD1@sourceware.org> Date: Mon, 18 Mar 2024 17:50:19 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3cd02612e831500dacc8d731f23a52aae01cbc39 commit 3cd02612e831500dacc8d731f23a52aae01cbc39 Author: Paul Eggert Date: Wed Jul 19 14:09:26 2023 -0700 make ‘struct pthread’ a complete type * nptl/descr.h (struct pthread): Remove end_padding member, which made this type incomplete. (PTHREAD_STRUCT_END_PADDING): Stop using end_padding. Reviewed-by: Siddhesh Poyarekar (cherry picked from commit 3edc4ff2ceff4a59587ebecb94148d3bcfa1df62) Diff: --- nptl/descr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nptl/descr.h b/nptl/descr.h index bb46b5958e..e2627bce05 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -411,11 +411,11 @@ struct pthread /* rseq area registered with the kernel. */ struct rseq rseq_area; - /* This member must be last. */ - char end_padding[]; - + /* Amount of end padding, if any, in this structure. + This definition relies on rseq_area being last. */ #define PTHREAD_STRUCT_END_PADDING \ - (sizeof (struct pthread) - offsetof (struct pthread, end_padding)) + (sizeof (struct pthread) - offsetof (struct pthread, rseq_area) \ + + sizeof (struct rseq)) } __attribute ((aligned (TCB_ALIGNMENT))); static inline bool