aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-01-13 21:29:21 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-09 13:56:48 +0100
commitfc7283264d14f2f374feec691726277cbf450ca8 (patch)
treee21ba24eb82a9f09fad3a77fdcbdf69315a3267a /nptl
parente5ad0570682a663fe704f0a7bb1edb61fca11ecb (diff)
downloadglibc-fc7283264d14f2f374feec691726277cbf450ca8.tar
glibc-fc7283264d14f2f374feec691726277cbf450ca8.tar.gz
glibc-fc7283264d14f2f374feec691726277cbf450ca8.tar.bz2
glibc-fc7283264d14f2f374feec691726277cbf450ca8.zip
C11 threads: do not require PTHREAD_DESTRUCTOR_ITERATIONS
It is optional in POSIX. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/tss_create.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nptl/tss_create.c b/nptl/tss_create.c
index ea1f2e0fba..4e170dd4fc 100644
--- a/nptl/tss_create.c
+++ b/nptl/tss_create.c
@@ -23,8 +23,10 @@ tss_create (tss_t *tss_id, tss_dtor_t destructor)
{
_Static_assert (sizeof (tss_t) == sizeof (pthread_key_t),
"sizeof (tss_t) != sizeof (pthread_key_t)");
+#ifdef PTHREAD_DESTRUCTOR_ITERATIONS
_Static_assert (TSS_DTOR_ITERATIONS == PTHREAD_DESTRUCTOR_ITERATIONS,
"TSS_DTOR_ITERATIONS != PTHREAD_DESTRUCTOR_ITERATIONS");
+#endif
int err_code = __pthread_key_create (tss_id, destructor);
return thrd_err_map (err_code);