From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2012) id 5CC423858410; Mon, 18 Mar 2024 17:49:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5CC423858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1710784175; bh=CjC0JTlTawhrbDRk4wS2L9AMePWfEHmdks2rRviffJw=; h=From:To:Subject:Date:From; b=B/Ra/ykw/zPEU+ghn3xrueQBvB8uutggu18c6gtTy1QZJxCJEzWTahlxE/j7eCCk/ VP8at6aeQ2cFt1Fwna4JKlmMhcT4MZSrR51/av9Oxq6tMCyTt7nEHS9r+JhBBA19gA knS84AXYPesPnxFhWMztLZyAKAHt6BRJ5PJJY+hc= 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=2E36/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.36/master X-Git-Oldrev: 4d4ba8bae4bac5e0fd266c22517a3f16a1006bbe X-Git-Newrev: e24f8e6b35ee0242312cb0f1a9fb5a76403e724e Message-Id: <20240318174935.5CC423858410@sourceware.org> Date: Mon, 18 Mar 2024 17:49:35 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e24f8e6b35ee0242312cb0f1a9fb5a76403e724e commit e24f8e6b35ee0242312cb0f1a9fb5a76403e724e 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 5cacb286f3..70cf4b639a 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -405,11 +405,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