From 23c77f60181eb549f11ec2f913b4270af29eee38 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 3 Dec 2021 16:28:07 +0100 Subject: 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 to obtain the fallback definition. Reviewed-by: H.J. Lu --- nptl/descr.h | 4 +++- nptl/tst-tls3mod.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'nptl') diff --git a/nptl/descr.h b/nptl/descr.h index 41ee56feb2..af2a6ab87a 100644 --- a/nptl/descr.h +++ b/nptl/descr.h @@ -36,7 +36,9 @@ #include #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 7090b41ce6..b2b218f7c9 100644 --- a/nptl/tst-tls3mod.c +++ b/nptl/tst-tls3mod.c @@ -23,6 +23,7 @@ #include #include #include +#include extern pthread_barrier_t b; -- cgit 1.4.1