public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Paul Eggert <eggert@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] make ‘struct pthread’ a complete type
Date: Wed, 19 Jul 2023 21:16:25 +0000 (GMT)	[thread overview]
Message-ID: <20230719211625.8D17C3858C2B@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3edc4ff2ceff4a59587ebecb94148d3bcfa1df62

commit 3edc4ff2ceff4a59587ebecb94148d3bcfa1df62
Author: Paul Eggert <eggert@cs.ucla.edu>
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 <siddhesh@sourceware.org>

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

                 reply	other threads:[~2023-07-19 21:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230719211625.8D17C3858C2B@sourceware.org \
    --to=eggert@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).