aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-12-03 16:28:07 +0100
committerFlorian Weimer <fweimer@redhat.com>2021-12-03 20:43:31 +0100
commit23c77f60181eb549f11ec2f913b4270af29eee38 (patch)
tree9436a2b96bea5e71e47306bb5b85eeb7f13992c1 /nptl
parent0656b649c56ea51cceb86e94842d89946cee919b (diff)
downloadglibc-23c77f60181eb549f11ec2f913b4270af29eee38.zip
glibc-23c77f60181eb549f11ec2f913b4270af29eee38.tar.gz
glibc-23c77f60181eb549f11ec2f913b4270af29eee38.tar.bz2
nptl: Increase default TCB alignment to 32
rseq support will use a 32-byte aligned field in struct pthread, so the whole struct needs to have at least that alignment. nptl/tst-tls3mod.c uses TCB_ALIGNMENT, therefore include <descr.h> to obtain the fallback definition. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/descr.h4
-rw-r--r--nptl/tst-tls3mod.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/nptl/descr.h b/nptl/descr.h
index 41ee56f..af2a6ab 100644
--- a/nptl/descr.h
+++ b/nptl/descr.h
@@ -36,7 +36,9 @@
#include <tls-internal-struct.h>
#ifndef TCB_ALIGNMENT
-# define TCB_ALIGNMENT sizeof (double)
+# define TCB_ALIGNMENT 32
+#elif TCB_ALIGNMENT < 32
+# error TCB_ALIGNMENT must be at least 32
#endif
diff --git a/nptl/tst-tls3mod.c b/nptl/tst-tls3mod.c
index 7090b41..b2b218f 100644
--- a/nptl/tst-tls3mod.c
+++ b/nptl/tst-tls3mod.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <pthreaddef.h>
+#include <descr.h>
extern pthread_barrier_t b;