diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/allocatestack.c | 2 | ||||
-rw-r--r-- | nptl/tst-sem11.c | 26 | ||||
-rw-r--r-- | nptl/tst-sem12.c | 20 |
3 files changed, 43 insertions, 5 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index f35a8369bd..2cb562f8ea 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -139,7 +139,7 @@ get_cached_stack (size_t *sizep, void **memp) memset (dtv, '\0', (dtv[-1].counter + 1) * sizeof (dtv_t)); /* Re-initialize the TLS. */ - _dl_allocate_tls_init (TLS_TPADJ (result), true); + _dl_allocate_tls_init (TLS_TPADJ (result), false); return result; } diff --git a/nptl/tst-sem11.c b/nptl/tst-sem11.c index 1a2dbafd89..a82bb737d5 100644 --- a/nptl/tst-sem11.c +++ b/nptl/tst-sem11.c @@ -1,3 +1,21 @@ +/* Test of semaphores. + Copyright (C) 2007-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + #include <semaphore.h> #include <stdio.h> #include <unistd.h> @@ -11,15 +29,15 @@ static void * tf (void *arg) { -#ifdef PREPARE - PREPARE +#ifdef TF_PREPARE + TF_PREPARE #endif SEM_WAIT (arg); return NULL; } int -main (void) +do_test (void) { int tries = 5; pthread_t th; @@ -83,3 +101,5 @@ main (void) return 0; } + +#include <support/test-driver.c> diff --git a/nptl/tst-sem12.c b/nptl/tst-sem12.c index 71d02b70e9..d4e22d9a8e 100644 --- a/nptl/tst-sem12.c +++ b/nptl/tst-sem12.c @@ -1,8 +1,26 @@ +/* Test of semaphores. + Copyright (C) 2007-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <https://www.gnu.org/licenses/>. */ + #include <time.h> #include <sys/time.h> -#define PREPARE \ +#define TF_PREPARE \ struct timespec ts; \ struct timeval tv; \ gettimeofday (&tv, NULL); \ |