From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1211) id 8D17C3858C2B; Wed, 19 Jul 2023 21:16:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8D17C3858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1689801385; bh=kA7KTnMwN/Pp8wbPsrwJvuQjFk8zeKOyMpeh2JOJ/uw=; h=From:To:Subject:Date:From; b=eeVT/s7rJUpCajXmI7O4jfVohH9KKXlZxPxwWR95NkLKGmtkftN7wLo9KnhqH9//r efK757JvkSjKxH+N6GZrZaZKueDVO++6qQdrtoxQM1u2ciLxgs/FVssj5ko2N/U/j9 Fkalb9KuXK/bdzDtdMbQILDqKNtn20I5YYeoP6xk= MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" From: Paul Eggert To: glibc-cvs@sourceware.org Subject: =?utf-8?q?=5Bglibc=5D_make_=E2=80=98struct_pthread=E2=80=99_a_complete_ty?= =?utf-8?q?pe?= X-Act-Checkin: glibc X-Git-Author: Paul Eggert X-Git-Refname: refs/heads/master X-Git-Oldrev: 30379efad117b85cc56a255cac628d0ad745bfe3 X-Git-Newrev: 3edc4ff2ceff4a59587ebecb94148d3bcfa1df62 Message-Id: <20230719211625.8D17C3858C2B@sourceware.org> Date: Wed, 19 Jul 2023 21:16:25 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3edc4ff2ceff4a59587ebecb94148d3bcfa1df62 commit 3edc4ff2ceff4a59587ebecb94148d3bcfa1df62 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 Diff: --- nptl/descr.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nptl/descr.h b/nptl/descr.h index 746a4b9e4a..d06abd6ad9 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -408,11 +408,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