public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] make ‘struct pthread’ a complete type
@ 2023-07-19 21:16 Paul Eggert
  0 siblings, 0 replies; only message in thread
From: Paul Eggert @ 2023-07-19 21:16 UTC (permalink / raw)
  To: glibc-cvs

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-19 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19 21:16 [glibc] make ‘struct pthread’ a complete type Paul Eggert

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).