about summary refs log tree commit diff
path: root/nptl/descr.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-07-19 14:09:26 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2023-07-19 14:16:04 -0700
commit3edc4ff2ceff4a59587ebecb94148d3bcfa1df62 (patch)
treeafaa8a6b0cc4603634c7dae724d62915fc698f9f /nptl/descr.h
parent30379efad117b85cc56a255cac628d0ad745bfe3 (diff)
downloadglibc-3edc4ff2ceff4a59587ebecb94148d3bcfa1df62.tar.gz
glibc-3edc4ff2ceff4a59587ebecb94148d3bcfa1df62.tar.xz
glibc-3edc4ff2ceff4a59587ebecb94148d3bcfa1df62.zip
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>
Diffstat (limited to 'nptl/descr.h')
-rw-r--r--nptl/descr.h8
1 files 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