2014-06-12 20:48:47 +00:00
|
|
|
# sysdeps makefile fragment for all pthread-supporting configurations.
|
2024-01-01 18:12:26 +00:00
|
|
|
# Copyright (C) 2014-2024 Free Software Foundation, Inc.
|
Initial revision
2002-11-26 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (queue_stack): Don't remove stack from list here.
Do it in the caller. Correct condition to prematurely terminate
loop to free stacks.
(__deallocate_stack): Remove stack from list here.
2002-11-26 Ulrich Drepper <drepper@redhat.com>
* Makefile (tests): Add tst-stack1.
* tst-stack1.c: New file.
* allocatestack.c (allocate_stack): Initialize the TCB on a user
provided stack.
* pthread_attr_getstack.c: Return bottom of the thread area.
2002-11-25 Ulrich Drepper <drepper@redhat.com>
* Makefile (libpthread-routines): Add pt-allocrtsig and
pthread_kill_other_threads.
* pt-allocrtsig.c: New file.
* pthread_kill_other_threads.c: New file.
* sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
all three functions.
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
allocrtsig.
* sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
__libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
and __libc_allocate_rtsig_private.
* Versions (libpthread): Export pthread_kill_other_threads_np,
__libc_current_sigrtmin, and __libc_current_sigrtmax.
2002-11-24 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (allocate_stack): stackaddr in attribute points to
the end of the stack. Adjust computations.
When mprotect call fails dequeue stack and free it.
* pthread_attr_setstack.c: Store top of the stack in stackaddr
attribute.
* pthread_getattr_np.c: Likewise.
* descr.h (IS_DETACHED): Add some more parenthesis to prevent
surprises.
2002-11-23 Ulrich Drepper <drepper@redhat.com>
* sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2002-11-22 Ulrich Drepper <drepper@redhat.com>
* pthread_getspecific.c: Optimize access to first 2nd-level array.
* pthread_setspecific.c: Likewise.
2002-11-21 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
definitions. Get them from the official place.
* sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
* sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
Use new CLONE_ flags in clone() calls.
* sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
* sysdeps/unix/sysv/linux/i386/fork.c: New file.
* Versions: Add pthread_* functions for libc.
* forward.c: New file.
* sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
errno-loc.
* herrno.c: New file.
* res.c: New file.
* Makefile (libpthread-routines): Remove sem_post, sem_wait,
sem_trywait, and sem_timedwait. Add herrno and res.
* sem_init.c: Don't initialize lock and waiters members.
* sem_open.c: Likewise.
* sem_post.c: Removed.
* sem_wait.c: Removed.
* sem_trywait.c: Removed.
* sem_timedwait.c: Removed.
* sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
Includes full implementations of sem_post, sem_wait, sem_trywait,
and sem_timedwait.
* sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
for new implementation.
* sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
and waiters fields.
* tst-sem3.c: Improve error message.
* tst-signal3.c: Likewise.
* init.c (__pthread_initialize_minimal): Use set_tid_address syscall
to tell the kernel about the termination futex and to initialize tid
member. Don't initialize main_thread.
* descr.h (struct pthread): Remove main_thread member.
* cancelllation.c (__do_cancel): Remove code handling main thread.
The main thread is not special anymore.
* allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
size of the stacks to stack_cache_actsize.
* pt-readv.c: Add missing "defined".
* pt-sigwait.c: Likewise.
* pt-writev.c: Likewise.
2002-11-09 Ulrich Drepper <drepper@redhat.com>
* Versions: Export __connect from libpthread.
Patch by Luca Barbieri <ldb@ldb.ods.org>.
* Makefile (libpthread-routines): Add pt-raise.
* sysdeps/unix/sysv/linux/raise.c: New file.
* sysdeps/unix/sysv/linux/pt-raise.c: New file.
* sysdeps/generic/pt-raise.c: New file.
* pthread_cond_init.c: Initialize all data elements of the condvar
structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
* pthread_attr_init.c: Actually implement 2.0 compatibility version.
* pthread_create.c: Likewise.
* Makefile (tests): Add tst-key1, tst-key2, tst-key3.
* tst-key1.c: New file.
* tst-key2.c: New file.
* tst-key3.c: New file.
* Versions: Export pthread_detach for version GLIBC_2.0.
Reported by Saurabh Desai <sdesai@austin.ibm.com>.
2002-11-08 Ulrich Drepper <drepper@redhat.com>
* pthread_key_create.c: Terminate search after an unused key was found.
Patch by Luca Barbieri <ldb@ldb.ods.org>.
* sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
Patch by Luca Barbieri <ldb@ldb.ods.org>.
2002-10-10 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
dynamic lookup for errno in PIC.
* allocatestack.c (get_cached_stack): Rearrange code slightly to
release the stack lock as soon as possible.
Call _dl_allocate_tls_init for TCB from the cache to re-initialize
the static TLS block.
(allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
* cancellation.c: Renamed from cancelation.c.
* Makefile: Adjust accordingly.
* pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
* cleanup_defer.c: Use CANCELLATION_P.
* pthread_testcancel.c: Likewise.
* descr.h: Fix spelling in comments.
* init.c: Likewise.
* pthread_getattr_np.c: Likewise.
* pthread_getschedparam.c: Likewise.
* pthread_setschedparam.c: Likewise.
* Versions: Likewise.
* pt-pselect.c: New file.
* Makefile (libpthread-routines): Add pt-pselect.
* Versions: Add pselect.
* tst-cancel4.c: New file.
* Makefile (tests): Add tst-cancel4.
2002-10-09 Ulrich Drepper <drepper@redhat.com>
* pthread_mutex_lock.c: Always record lock ownership.
* pthread_mutex_timedlock.c: Likewise.
* pthread_mutex_trylock.c: Likewise.
* pt-readv.c: New file.
* pt-writev.c: New file.
* pt-creat.c: New file.
* pt-msgrcv.c: New file.
* pt-msgsnd.c: New file.
* pt-poll.c: New file.
* pt-select.c: New file.
* pt-sigpause.c: New file.
* pt-sigsuspend.c: New file.
* pt-sigwait.c: New file.
* pt-sigwaitinfo.c: New file.
* pt-waitid.c: New file.
* Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
pt-sigwait, pt-sigwaitinfo, and pt-waitid.
* Versions: Add all the new functions.
* tst-exit1.c: New file.
* Makefile (tests): Add tst-exit1.
* sem_timedwait.c: Minor optimization for more optimal fastpath.
2002-10-08 Ulrich Drepper <drepper@redhat.com>
* pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
* pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
call. pthread_join is an official cancellation point.
* pthread_timedjoin.c: Likewise.
* pthread_cond_wait.c: Revert order in which internal lock are dropped
and the condvar's mutex are retrieved.
* pthread_cond_timedwait.c: Likewise.
Reported by dice@saros.East.Sun.COM.
2002-10-07 Ulrich Drepper <drepper@redhat.com>
* pthreadP.h: Cut out all type definitions and move them...
* sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
* pthreadP.h: Include <internaltypes.h>.
* sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
performance tweaks.
* sem_trywait.c: Shuffle #includes around to get right order.
* sem_timedwait.c: Likewise.
* sem_post.c: Likewise.
* sem_wait.c: Likewise.
* nptl 0.3 released.
* Makefile (tests): Add tst-signal3.
* tst-signal3.c: New file.
2002-10-05 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
the asms modify the sem object.
(__lll_sem_timedwait): Now takes struct sem* as first parameter.
* sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
the actual members.
* pthreadP.h (struct sem): New type. Actual semaphore type.
* semaphoreP.h: Include pthreadP.h.
* sem_getvalue.c: Adjust to sem_t change.
* sem_init.c: Likewise.
* sem_open.c: Likewise.
* sem_post.c: Likewise.
* sem_timedwait.c: Likewise.
* sem_trywait.c: Likewise.
* sem_wait.c: Likewise.
2002-10-04 Ulrich Drepper <drepper@redhat.com>
* Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
* tst-basic2.c: New file.
* tst-exec1.c: New file.
* tst-exec2.c: New file.
* tst-exec3.c: New file.
* tst-fork1.c: Remove extra */.
* nptl 0.2 released. The API for IA-32 is complete.
2002-11-26 22:50:54 +00:00
|
|
|
# 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
|
2012-02-09 23:18:22 +00:00
|
|
|
# License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 05:40:42 +00:00
|
|
|
# <https://www.gnu.org/licenses/>.
|
Initial revision
2002-11-26 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (queue_stack): Don't remove stack from list here.
Do it in the caller. Correct condition to prematurely terminate
loop to free stacks.
(__deallocate_stack): Remove stack from list here.
2002-11-26 Ulrich Drepper <drepper@redhat.com>
* Makefile (tests): Add tst-stack1.
* tst-stack1.c: New file.
* allocatestack.c (allocate_stack): Initialize the TCB on a user
provided stack.
* pthread_attr_getstack.c: Return bottom of the thread area.
2002-11-25 Ulrich Drepper <drepper@redhat.com>
* Makefile (libpthread-routines): Add pt-allocrtsig and
pthread_kill_other_threads.
* pt-allocrtsig.c: New file.
* pthread_kill_other_threads.c: New file.
* sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
all three functions.
* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
allocrtsig.
* sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
__libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
and __libc_allocate_rtsig_private.
* Versions (libpthread): Export pthread_kill_other_threads_np,
__libc_current_sigrtmin, and __libc_current_sigrtmax.
2002-11-24 Ulrich Drepper <drepper@redhat.com>
* allocatestack.c (allocate_stack): stackaddr in attribute points to
the end of the stack. Adjust computations.
When mprotect call fails dequeue stack and free it.
* pthread_attr_setstack.c: Store top of the stack in stackaddr
attribute.
* pthread_getattr_np.c: Likewise.
* descr.h (IS_DETACHED): Add some more parenthesis to prevent
surprises.
2002-11-23 Ulrich Drepper <drepper@redhat.com>
* sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
2002-11-22 Ulrich Drepper <drepper@redhat.com>
* pthread_getspecific.c: Optimize access to first 2nd-level array.
* pthread_setspecific.c: Likewise.
2002-11-21 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
definitions. Get them from the official place.
* sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
* sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
Use new CLONE_ flags in clone() calls.
* sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
* sysdeps/unix/sysv/linux/i386/fork.c: New file.
* Versions: Add pthread_* functions for libc.
* forward.c: New file.
* sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
errno-loc.
* herrno.c: New file.
* res.c: New file.
* Makefile (libpthread-routines): Remove sem_post, sem_wait,
sem_trywait, and sem_timedwait. Add herrno and res.
* sem_init.c: Don't initialize lock and waiters members.
* sem_open.c: Likewise.
* sem_post.c: Removed.
* sem_wait.c: Removed.
* sem_trywait.c: Removed.
* sem_timedwait.c: Removed.
* sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
Includes full implementations of sem_post, sem_wait, sem_trywait,
and sem_timedwait.
* sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
for new implementation.
* sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
and waiters fields.
* tst-sem3.c: Improve error message.
* tst-signal3.c: Likewise.
* init.c (__pthread_initialize_minimal): Use set_tid_address syscall
to tell the kernel about the termination futex and to initialize tid
member. Don't initialize main_thread.
* descr.h (struct pthread): Remove main_thread member.
* cancelllation.c (__do_cancel): Remove code handling main thread.
The main thread is not special anymore.
* allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
size of the stacks to stack_cache_actsize.
* pt-readv.c: Add missing "defined".
* pt-sigwait.c: Likewise.
* pt-writev.c: Likewise.
2002-11-09 Ulrich Drepper <drepper@redhat.com>
* Versions: Export __connect from libpthread.
Patch by Luca Barbieri <ldb@ldb.ods.org>.
* Makefile (libpthread-routines): Add pt-raise.
* sysdeps/unix/sysv/linux/raise.c: New file.
* sysdeps/unix/sysv/linux/pt-raise.c: New file.
* sysdeps/generic/pt-raise.c: New file.
* pthread_cond_init.c: Initialize all data elements of the condvar
structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
* pthread_attr_init.c: Actually implement 2.0 compatibility version.
* pthread_create.c: Likewise.
* Makefile (tests): Add tst-key1, tst-key2, tst-key3.
* tst-key1.c: New file.
* tst-key2.c: New file.
* tst-key3.c: New file.
* Versions: Export pthread_detach for version GLIBC_2.0.
Reported by Saurabh Desai <sdesai@austin.ibm.com>.
2002-11-08 Ulrich Drepper <drepper@redhat.com>
* pthread_key_create.c: Terminate search after an unused key was found.
Patch by Luca Barbieri <ldb@ldb.ods.org>.
* sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
Patch by Luca Barbieri <ldb@ldb.ods.org>.
2002-10-10 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
dynamic lookup for errno in PIC.
* allocatestack.c (get_cached_stack): Rearrange code slightly to
release the stack lock as soon as possible.
Call _dl_allocate_tls_init for TCB from the cache to re-initialize
the static TLS block.
(allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
* cancellation.c: Renamed from cancelation.c.
* Makefile: Adjust accordingly.
* pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
* cleanup_defer.c: Use CANCELLATION_P.
* pthread_testcancel.c: Likewise.
* descr.h: Fix spelling in comments.
* init.c: Likewise.
* pthread_getattr_np.c: Likewise.
* pthread_getschedparam.c: Likewise.
* pthread_setschedparam.c: Likewise.
* Versions: Likewise.
* pt-pselect.c: New file.
* Makefile (libpthread-routines): Add pt-pselect.
* Versions: Add pselect.
* tst-cancel4.c: New file.
* Makefile (tests): Add tst-cancel4.
2002-10-09 Ulrich Drepper <drepper@redhat.com>
* pthread_mutex_lock.c: Always record lock ownership.
* pthread_mutex_timedlock.c: Likewise.
* pthread_mutex_trylock.c: Likewise.
* pt-readv.c: New file.
* pt-writev.c: New file.
* pt-creat.c: New file.
* pt-msgrcv.c: New file.
* pt-msgsnd.c: New file.
* pt-poll.c: New file.
* pt-select.c: New file.
* pt-sigpause.c: New file.
* pt-sigsuspend.c: New file.
* pt-sigwait.c: New file.
* pt-sigwaitinfo.c: New file.
* pt-waitid.c: New file.
* Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
pt-sigwait, pt-sigwaitinfo, and pt-waitid.
* Versions: Add all the new functions.
* tst-exit1.c: New file.
* Makefile (tests): Add tst-exit1.
* sem_timedwait.c: Minor optimization for more optimal fastpath.
2002-10-08 Ulrich Drepper <drepper@redhat.com>
* pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
* pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
call. pthread_join is an official cancellation point.
* pthread_timedjoin.c: Likewise.
* pthread_cond_wait.c: Revert order in which internal lock are dropped
and the condvar's mutex are retrieved.
* pthread_cond_timedwait.c: Likewise.
Reported by dice@saros.East.Sun.COM.
2002-10-07 Ulrich Drepper <drepper@redhat.com>
* pthreadP.h: Cut out all type definitions and move them...
* sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
* pthreadP.h: Include <internaltypes.h>.
* sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
performance tweaks.
* sem_trywait.c: Shuffle #includes around to get right order.
* sem_timedwait.c: Likewise.
* sem_post.c: Likewise.
* sem_wait.c: Likewise.
* nptl 0.3 released.
* Makefile (tests): Add tst-signal3.
* tst-signal3.c: New file.
2002-10-05 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
the asms modify the sem object.
(__lll_sem_timedwait): Now takes struct sem* as first parameter.
* sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
the actual members.
* pthreadP.h (struct sem): New type. Actual semaphore type.
* semaphoreP.h: Include pthreadP.h.
* sem_getvalue.c: Adjust to sem_t change.
* sem_init.c: Likewise.
* sem_open.c: Likewise.
* sem_post.c: Likewise.
* sem_timedwait.c: Likewise.
* sem_trywait.c: Likewise.
* sem_wait.c: Likewise.
2002-10-04 Ulrich Drepper <drepper@redhat.com>
* Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
* tst-basic2.c: New file.
* tst-exec1.c: New file.
* tst-exec2.c: New file.
* tst-exec3.c: New file.
* tst-fork1.c: Remove extra */.
* nptl 0.2 released. The API for IA-32 is complete.
2002-11-26 22:50:54 +00:00
|
|
|
|
2014-07-04 01:52:51 +00:00
|
|
|
ifeq ($(subdir),rt)
|
2021-06-28 07:51:01 +00:00
|
|
|
$(objpfx)tst-timer: $(librt)
|
2014-07-04 01:52:51 +00:00
|
|
|
endif
|
2020-01-13 19:58:28 +00:00
|
|
|
|
|
|
|
ifneq (,$(filter $(subdir),htl nptl))
|
2023-04-18 15:02:09 +00:00
|
|
|
headers += \
|
|
|
|
threads.h \
|
|
|
|
# headers
|
|
|
|
|
|
|
|
routines += \
|
|
|
|
pthread_atfork \
|
|
|
|
thrd_current \
|
|
|
|
thrd_equal \
|
|
|
|
thrd_sleep \
|
|
|
|
thrd_yield \
|
|
|
|
# routines
|
2020-01-13 19:58:28 +00:00
|
|
|
|
2021-05-03 06:12:11 +00:00
|
|
|
$(libpthread-routines-var) += \
|
2021-05-03 06:12:11 +00:00
|
|
|
call_once \
|
2021-05-03 06:12:11 +00:00
|
|
|
cnd_broadcast \
|
2021-05-03 06:12:11 +00:00
|
|
|
cnd_destroy \
|
2021-05-03 06:12:11 +00:00
|
|
|
cnd_init \
|
2021-05-03 06:12:11 +00:00
|
|
|
cnd_signal \
|
2021-05-03 06:12:11 +00:00
|
|
|
cnd_timedwait \
|
2021-05-03 06:12:11 +00:00
|
|
|
cnd_wait \
|
2021-05-03 06:12:11 +00:00
|
|
|
mtx_destroy \
|
2021-05-03 06:12:11 +00:00
|
|
|
mtx_init \
|
2021-05-03 06:12:11 +00:00
|
|
|
mtx_lock \
|
2021-05-03 06:12:11 +00:00
|
|
|
mtx_timedlock \
|
2021-05-03 06:12:11 +00:00
|
|
|
mtx_trylock \
|
2021-05-03 06:12:12 +00:00
|
|
|
mtx_unlock \
|
2021-01-20 17:06:56 +00:00
|
|
|
pthread_atfork_compat \
|
2021-05-21 20:35:00 +00:00
|
|
|
thrd_create \
|
2021-05-11 09:08:00 +00:00
|
|
|
thrd_detach \
|
2021-05-03 06:12:12 +00:00
|
|
|
thrd_exit \
|
2021-05-11 09:08:00 +00:00
|
|
|
thrd_join \
|
2021-05-03 06:12:12 +00:00
|
|
|
tss_create \
|
2021-05-03 06:12:12 +00:00
|
|
|
tss_delete \
|
2021-05-03 06:12:12 +00:00
|
|
|
tss_get \
|
2021-05-03 06:12:12 +00:00
|
|
|
tss_set \
|
2023-04-18 15:02:09 +00:00
|
|
|
# $(libpthread-routines-var)
|
2021-05-03 06:12:11 +00:00
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
tests += \
|
|
|
|
tst-abstime \
|
|
|
|
tst-atfork1 \
|
|
|
|
tst-attr1 \
|
|
|
|
tst-backtrace1 \
|
|
|
|
tst-bad-schedattr \
|
|
|
|
tst-barrier1 \
|
|
|
|
tst-barrier2 \
|
|
|
|
tst-barrier3 \
|
|
|
|
tst-barrier4 \
|
|
|
|
tst-basic1 \
|
|
|
|
tst-basic2 \
|
|
|
|
tst-basic3 \
|
|
|
|
tst-basic4 \
|
|
|
|
tst-basic5 \
|
|
|
|
tst-basic6 \
|
|
|
|
tst-basic7 \
|
|
|
|
tst-call-once \
|
|
|
|
tst-cancel-self \
|
|
|
|
tst-cancel-self-cancelstate \
|
|
|
|
tst-cancel-self-canceltype \
|
|
|
|
tst-cancel-self-testcancel \
|
|
|
|
tst-cancel1 \
|
|
|
|
tst-cancel2 \
|
|
|
|
tst-cancel3 \
|
|
|
|
tst-cancel4 \
|
|
|
|
tst-cancel5 \
|
|
|
|
tst-cancel6 \
|
|
|
|
tst-cancel8 \
|
|
|
|
tst-cancel9 \
|
|
|
|
tst-cancel10 \
|
|
|
|
tst-cancel11 \
|
|
|
|
tst-cancel12 \
|
|
|
|
tst-cancel13 \
|
|
|
|
tst-cancel14 \
|
|
|
|
tst-cancel15 \
|
|
|
|
tst-cancel16 \
|
|
|
|
tst-cancel18 \
|
|
|
|
tst-cancel19 \
|
|
|
|
tst-cancel20 \
|
|
|
|
tst-cancel21 \
|
|
|
|
tst-cancel22 \
|
|
|
|
tst-cancel23 \
|
|
|
|
tst-cancel26 \
|
|
|
|
tst-cancel27 \
|
|
|
|
tst-cancel28 \
|
|
|
|
tst-cancel29 \
|
|
|
|
tst-cancel30 \
|
|
|
|
tst-cleanup0 \
|
|
|
|
tst-cleanup1 \
|
|
|
|
tst-cleanup2 \
|
|
|
|
tst-cleanup3 \
|
|
|
|
tst-clock1 \
|
|
|
|
tst-cnd-basic \
|
|
|
|
tst-cnd-broadcast \
|
|
|
|
tst-cnd-timedwait \
|
|
|
|
tst-cond-except \
|
|
|
|
tst-cond1 \
|
|
|
|
tst-cond2 \
|
|
|
|
tst-cond3 \
|
|
|
|
tst-cond4 \
|
|
|
|
tst-cond5 \
|
|
|
|
tst-cond6 \
|
|
|
|
tst-cond7 \
|
|
|
|
tst-cond8 \
|
|
|
|
tst-cond9 \
|
|
|
|
tst-cond10 \
|
|
|
|
tst-cond11 \
|
|
|
|
tst-cond12 \
|
|
|
|
tst-cond13 \
|
|
|
|
tst-cond14 \
|
|
|
|
tst-cond15 \
|
|
|
|
tst-cond16 \
|
|
|
|
tst-cond17 \
|
|
|
|
tst-cond18 \
|
|
|
|
tst-cond19 \
|
|
|
|
tst-cond20 \
|
|
|
|
tst-cond21 \
|
|
|
|
tst-cond23 \
|
|
|
|
tst-cond24 \
|
|
|
|
tst-cond25 \
|
|
|
|
tst-cond27 \
|
|
|
|
tst-create-detached \
|
|
|
|
tst-detach1 \
|
|
|
|
tst-eintr2 \
|
|
|
|
tst-eintr3 \
|
|
|
|
tst-eintr4 \
|
|
|
|
tst-eintr5 \
|
|
|
|
tst-exec1 \
|
|
|
|
tst-exec2 \
|
|
|
|
tst-exec3 \
|
|
|
|
tst-exit1 \
|
|
|
|
tst-exit2 \
|
|
|
|
tst-exit3 \
|
|
|
|
tst-flock1 \
|
|
|
|
tst-flock2 \
|
|
|
|
tst-fork1 \
|
|
|
|
tst-fork2 \
|
|
|
|
tst-fork3 \
|
|
|
|
tst-fork4 \
|
|
|
|
tst-getpid3 \
|
|
|
|
tst-join1 \
|
|
|
|
tst-join2 \
|
|
|
|
tst-join3 \
|
|
|
|
tst-join4 \
|
|
|
|
tst-join5 \
|
|
|
|
tst-join6 \
|
|
|
|
tst-join7 \
|
|
|
|
tst-join8 \
|
|
|
|
tst-join9 \
|
|
|
|
tst-join10 \
|
|
|
|
tst-join11 \
|
|
|
|
tst-join12 \
|
|
|
|
tst-join13 \
|
|
|
|
tst-join14 \
|
|
|
|
tst-join15 \
|
2024-10-21 20:56:48 +00:00
|
|
|
tst-join16 \
|
2023-04-18 15:02:09 +00:00
|
|
|
tst-key1 \
|
|
|
|
tst-key2 \
|
|
|
|
tst-key3 \
|
|
|
|
tst-key4 \
|
|
|
|
tst-kill1 \
|
|
|
|
tst-kill2 \
|
|
|
|
tst-kill3 \
|
|
|
|
tst-kill5 \
|
|
|
|
tst-kill6 \
|
|
|
|
tst-locale1 \
|
|
|
|
tst-locale2 \
|
|
|
|
tst-memstream \
|
|
|
|
tst-mtx-basic \
|
|
|
|
tst-mtx-recursive \
|
|
|
|
tst-mtx-timedlock \
|
|
|
|
tst-mtx-trylock \
|
|
|
|
tst-mutex-errorcheck \
|
|
|
|
tst-mutex1 \
|
|
|
|
tst-mutex2 \
|
|
|
|
tst-mutex3 \
|
|
|
|
tst-mutex4 \
|
|
|
|
tst-mutex5 \
|
|
|
|
tst-mutex6 \
|
|
|
|
tst-mutex7 \
|
|
|
|
tst-mutex9 \
|
|
|
|
tst-mutex10 \
|
|
|
|
tst-mutex11 \
|
|
|
|
tst-once1 \
|
|
|
|
tst-once2 \
|
|
|
|
tst-once3 \
|
|
|
|
tst-once4 \
|
|
|
|
tst-pt-align \
|
|
|
|
tst-pt-align3 \
|
|
|
|
tst-pt-popen1 \
|
|
|
|
tst-pt-sysconf \
|
|
|
|
tst-pt-tls1 \
|
|
|
|
tst-pt-tls2 \
|
|
|
|
tst-pt-vfork1 \
|
|
|
|
tst-pt-vfork2 \
|
|
|
|
tst-pthread-exit-signal \
|
|
|
|
tst-pthread-mutexattr \
|
2024-10-23 16:45:15 +00:00
|
|
|
tst-pthread-mutexattr-2 \
|
2023-04-18 15:02:09 +00:00
|
|
|
tst-pthread-raise-blocked-self \
|
|
|
|
tst-pthread-setuid-loop \
|
|
|
|
tst-pthread_cancel-exited \
|
|
|
|
tst-pthread_cancel-select-loop \
|
|
|
|
tst-pthread_kill-exited \
|
|
|
|
tst-pthread_kill-exiting \
|
|
|
|
tst-raise1 \
|
|
|
|
tst-robust1 \
|
|
|
|
tst-robust2 \
|
|
|
|
tst-robust3 \
|
|
|
|
tst-robust4 \
|
|
|
|
tst-robust5 \
|
|
|
|
tst-robust6 \
|
|
|
|
tst-robust7 \
|
|
|
|
tst-robust9 \
|
|
|
|
tst-robust10 \
|
|
|
|
tst-robust11 \
|
|
|
|
tst-rwlock-tryrdlock-stall \
|
|
|
|
tst-rwlock-trywrlock-stall \
|
|
|
|
tst-rwlock1 \
|
|
|
|
tst-rwlock4 \
|
|
|
|
tst-rwlock5 \
|
|
|
|
tst-rwlock12 \
|
|
|
|
tst-rwlock13 \
|
|
|
|
tst-rwlock14 \
|
|
|
|
tst-rwlock16 \
|
|
|
|
tst-sem1 \
|
|
|
|
tst-sem2 \
|
|
|
|
tst-sem3 \
|
|
|
|
tst-sem4 \
|
|
|
|
tst-sem5 \
|
|
|
|
tst-sem6 \
|
|
|
|
tst-sem7 \
|
|
|
|
tst-sem8 \
|
|
|
|
tst-sem9 \
|
|
|
|
tst-sem10 \
|
|
|
|
tst-sem14 \
|
|
|
|
tst-sem15 \
|
|
|
|
tst-sem16 \
|
2024-11-08 17:08:09 +00:00
|
|
|
tst-sem18 \
|
2023-04-18 15:02:09 +00:00
|
|
|
tst-setuid3 \
|
|
|
|
tst-signal1 \
|
|
|
|
tst-signal2 \
|
|
|
|
tst-signal4 \
|
|
|
|
tst-signal5 \
|
|
|
|
tst-signal6 \
|
|
|
|
tst-signal8 \
|
|
|
|
tst-spin1 \
|
|
|
|
tst-spin2 \
|
|
|
|
tst-spin3 \
|
|
|
|
tst-spin4 \
|
|
|
|
tst-stack1 \
|
|
|
|
tst-stdio1 \
|
|
|
|
tst-stdio2 \
|
|
|
|
tst-thrd-detach \
|
|
|
|
tst-thrd-sleep \
|
|
|
|
tst-tsd1 \
|
|
|
|
tst-tsd2 \
|
|
|
|
tst-tsd5 \
|
|
|
|
tst-tsd6 \
|
|
|
|
tst-tss-basic \
|
|
|
|
tst-umask1 \
|
|
|
|
tst-unload \
|
|
|
|
tst-unwind-thread \
|
|
|
|
tst-vfork1x \
|
|
|
|
tst-vfork2x \
|
|
|
|
# tests
|
2020-06-07 02:03:45 +00:00
|
|
|
|
2024-04-30 16:57:12 +00:00
|
|
|
tests-2.0 += \
|
|
|
|
tst-pthread_kill-exited
|
|
|
|
# tests-2.0
|
|
|
|
|
2022-02-14 12:27:05 +00:00
|
|
|
tests-time64 += \
|
y2038: Add test coverage
It is enabled through a new rule, tests-y2038, which is built only
when the ABI supports the comapt 64-bit time_t (defined by the
header time64-compat.h, which also enables the creation of the
symbol Version for Linux). It means the tests are not built
for ABI which already provide default 64-bit time_t.
The new rule already adds the required LFS and 64-bit time_t
compiler flags.
The current coverage is:
* libc:
- adjtime tst-adjtime-time64
- adjtimex tst-adjtimex-time64
- clock_adjtime tst-clock_adjtime-time64
- clock_getres tst-clock-time64, tst-cpuclock1-time64
- clock_gettime tst-clock-time64, tst-clock2-time64,
tst-cpuclock1-time64
- clock_nanosleep tst-clock_nanosleep-time64,
tst-cpuclock1-time64
- clock_settime tst-clock2-time64
- cnd_timedwait tst-cnd-timedwait-time64
- ctime tst-ctime-time64
- ctime_r tst-ctime-time64
- difftime tst-difftime-time64
- fstat tst-stat-time64
- fstatat tst-stat-time64
- futimens tst-futimens-time64
- futimes tst-futimes-time64
- futimesat tst-futimesat-time64
- fts_* tst-fts-time64
- getitimer tst-itimer-timer64
- getrusage
- gettimeofday tst-clock_nanosleep-time64
- glob / globfree tst-gnuglob64-time64
- gmtime tst-gmtime-time64
- gmtime_r tst-gmtime-time64
- lstat tst-stat-time64
- localtime tst-y2039-time64
- localtime_t tst-y2039-time64
- lutimes tst-lutimes-time64
- mktime tst-mktime4-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- msgctl test-sysvmsg-time64
- mtx_timedlock tst-mtx-timedlock-time64
- nanosleep tst-cpuclock{12}-time64,
tst-mqueue8-time64, tst-clock-time64
- nftw / ftw ftwtest-time64
- ntp_adjtime tst-ntp_adjtime-time64
- ntp_gettime tst-ntp_gettime-time64
- ntp_gettimex tst-ntp_gettimex-time64
- ppoll tst-ppoll-time64
- pselect tst-pselect-time64
- pthread_clockjoin_np tst-join14-time64
- pthread_cond_clockwait tst-cond11-time64
- pthread_cond_timedwait tst-abstime-time64
- pthread_mutex_clocklock tst-abstime-time64
- pthread_mutex_timedlock tst-abstime-time64
- pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_timedjoin_np tst-join14-time64
- recvmmsg tst-cancel4_2-time64
- sched_rr_get_interval tst-sched_rr_get_interval-time64
- select tst-select-time64
- sem_clockwait tst-sem5-time64
- sem_timedwait tst-sem5-time64
- semctl test-sysvsem-time64
- semtimedop test-sysvsem-time64
- setitimer tst-mqueue2-time64, tst-itimer-timer64
- settimeofday tst-settimeofday-time64
- shmctl test-sysvshm-time64
- sigtimedwait tst-sigtimedwait-time64
- stat tst-stat-time64
- thrd_sleep tst-thrd-sleep-time64
- time tst-mqueue{1248}-time64
- timegm tst-timegm-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
- timerfd_gettime tst-timerfd-time64
- timerfd_settime tst-timerfd-time64
- timespec_get tst-timespec_get-time64
- timespec_getres tst-timespec_getres-time64
- utime tst-utime-time64
- utimensat tst-utimensat-time64
- utimes tst-utimes-time64
- wait3 tst-wait3-time64
- wait4 tst-wait4-time64
* librt:
- aio_suspend tst-aio6-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
* libanl:
- gai_suspend
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-02-17 18:59:34 +00:00
|
|
|
tst-abstime-time64 \
|
|
|
|
tst-cnd-timedwait-time64 \
|
|
|
|
tst-cond11-time64 \
|
|
|
|
tst-join14-time64 \
|
2024-10-21 20:56:48 +00:00
|
|
|
tst-join16-time64 \
|
y2038: Add test coverage
It is enabled through a new rule, tests-y2038, which is built only
when the ABI supports the comapt 64-bit time_t (defined by the
header time64-compat.h, which also enables the creation of the
symbol Version for Linux). It means the tests are not built
for ABI which already provide default 64-bit time_t.
The new rule already adds the required LFS and 64-bit time_t
compiler flags.
The current coverage is:
* libc:
- adjtime tst-adjtime-time64
- adjtimex tst-adjtimex-time64
- clock_adjtime tst-clock_adjtime-time64
- clock_getres tst-clock-time64, tst-cpuclock1-time64
- clock_gettime tst-clock-time64, tst-clock2-time64,
tst-cpuclock1-time64
- clock_nanosleep tst-clock_nanosleep-time64,
tst-cpuclock1-time64
- clock_settime tst-clock2-time64
- cnd_timedwait tst-cnd-timedwait-time64
- ctime tst-ctime-time64
- ctime_r tst-ctime-time64
- difftime tst-difftime-time64
- fstat tst-stat-time64
- fstatat tst-stat-time64
- futimens tst-futimens-time64
- futimes tst-futimes-time64
- futimesat tst-futimesat-time64
- fts_* tst-fts-time64
- getitimer tst-itimer-timer64
- getrusage
- gettimeofday tst-clock_nanosleep-time64
- glob / globfree tst-gnuglob64-time64
- gmtime tst-gmtime-time64
- gmtime_r tst-gmtime-time64
- lstat tst-stat-time64
- localtime tst-y2039-time64
- localtime_t tst-y2039-time64
- lutimes tst-lutimes-time64
- mktime tst-mktime4-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- msgctl test-sysvmsg-time64
- mtx_timedlock tst-mtx-timedlock-time64
- nanosleep tst-cpuclock{12}-time64,
tst-mqueue8-time64, tst-clock-time64
- nftw / ftw ftwtest-time64
- ntp_adjtime tst-ntp_adjtime-time64
- ntp_gettime tst-ntp_gettime-time64
- ntp_gettimex tst-ntp_gettimex-time64
- ppoll tst-ppoll-time64
- pselect tst-pselect-time64
- pthread_clockjoin_np tst-join14-time64
- pthread_cond_clockwait tst-cond11-time64
- pthread_cond_timedwait tst-abstime-time64
- pthread_mutex_clocklock tst-abstime-time64
- pthread_mutex_timedlock tst-abstime-time64
- pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_timedjoin_np tst-join14-time64
- recvmmsg tst-cancel4_2-time64
- sched_rr_get_interval tst-sched_rr_get_interval-time64
- select tst-select-time64
- sem_clockwait tst-sem5-time64
- sem_timedwait tst-sem5-time64
- semctl test-sysvsem-time64
- semtimedop test-sysvsem-time64
- setitimer tst-mqueue2-time64, tst-itimer-timer64
- settimeofday tst-settimeofday-time64
- shmctl test-sysvshm-time64
- sigtimedwait tst-sigtimedwait-time64
- stat tst-stat-time64
- thrd_sleep tst-thrd-sleep-time64
- time tst-mqueue{1248}-time64
- timegm tst-timegm-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
- timerfd_gettime tst-timerfd-time64
- timerfd_settime tst-timerfd-time64
- timespec_get tst-timespec_get-time64
- timespec_getres tst-timespec_getres-time64
- utime tst-utime-time64
- utimensat tst-utimensat-time64
- utimes tst-utimes-time64
- wait3 tst-wait3-time64
- wait4 tst-wait4-time64
* librt:
- aio_suspend tst-aio6-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
* libanl:
- gai_suspend
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-02-17 18:59:34 +00:00
|
|
|
tst-mtx-timedlock-time64 \
|
|
|
|
tst-rwlock14-time64 \
|
|
|
|
tst-sem5-time64 \
|
|
|
|
tst-thrd-sleep-time64 \
|
2023-04-18 15:02:09 +00:00
|
|
|
# tests-time64
|
y2038: Add test coverage
It is enabled through a new rule, tests-y2038, which is built only
when the ABI supports the comapt 64-bit time_t (defined by the
header time64-compat.h, which also enables the creation of the
symbol Version for Linux). It means the tests are not built
for ABI which already provide default 64-bit time_t.
The new rule already adds the required LFS and 64-bit time_t
compiler flags.
The current coverage is:
* libc:
- adjtime tst-adjtime-time64
- adjtimex tst-adjtimex-time64
- clock_adjtime tst-clock_adjtime-time64
- clock_getres tst-clock-time64, tst-cpuclock1-time64
- clock_gettime tst-clock-time64, tst-clock2-time64,
tst-cpuclock1-time64
- clock_nanosleep tst-clock_nanosleep-time64,
tst-cpuclock1-time64
- clock_settime tst-clock2-time64
- cnd_timedwait tst-cnd-timedwait-time64
- ctime tst-ctime-time64
- ctime_r tst-ctime-time64
- difftime tst-difftime-time64
- fstat tst-stat-time64
- fstatat tst-stat-time64
- futimens tst-futimens-time64
- futimes tst-futimes-time64
- futimesat tst-futimesat-time64
- fts_* tst-fts-time64
- getitimer tst-itimer-timer64
- getrusage
- gettimeofday tst-clock_nanosleep-time64
- glob / globfree tst-gnuglob64-time64
- gmtime tst-gmtime-time64
- gmtime_r tst-gmtime-time64
- lstat tst-stat-time64
- localtime tst-y2039-time64
- localtime_t tst-y2039-time64
- lutimes tst-lutimes-time64
- mktime tst-mktime4-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- msgctl test-sysvmsg-time64
- mtx_timedlock tst-mtx-timedlock-time64
- nanosleep tst-cpuclock{12}-time64,
tst-mqueue8-time64, tst-clock-time64
- nftw / ftw ftwtest-time64
- ntp_adjtime tst-ntp_adjtime-time64
- ntp_gettime tst-ntp_gettime-time64
- ntp_gettimex tst-ntp_gettimex-time64
- ppoll tst-ppoll-time64
- pselect tst-pselect-time64
- pthread_clockjoin_np tst-join14-time64
- pthread_cond_clockwait tst-cond11-time64
- pthread_cond_timedwait tst-abstime-time64
- pthread_mutex_clocklock tst-abstime-time64
- pthread_mutex_timedlock tst-abstime-time64
- pthread_rwlock_clockrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_clockwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedrdlock tst-abstime-time64, tst-rwlock14-time64
- pthread_rwlock_timedwrlock tst-abstime-time64, tst-rwlock14-time64
- pthread_timedjoin_np tst-join14-time64
- recvmmsg tst-cancel4_2-time64
- sched_rr_get_interval tst-sched_rr_get_interval-time64
- select tst-select-time64
- sem_clockwait tst-sem5-time64
- sem_timedwait tst-sem5-time64
- semctl test-sysvsem-time64
- semtimedop test-sysvsem-time64
- setitimer tst-mqueue2-time64, tst-itimer-timer64
- settimeofday tst-settimeofday-time64
- shmctl test-sysvshm-time64
- sigtimedwait tst-sigtimedwait-time64
- stat tst-stat-time64
- thrd_sleep tst-thrd-sleep-time64
- time tst-mqueue{1248}-time64
- timegm tst-timegm-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
- timerfd_gettime tst-timerfd-time64
- timerfd_settime tst-timerfd-time64
- timespec_get tst-timespec_get-time64
- timespec_getres tst-timespec_getres-time64
- utime tst-utime-time64
- utimensat tst-utimensat-time64
- utimes tst-utimes-time64
- wait3 tst-wait3-time64
- wait4 tst-wait4-time64
* librt:
- aio_suspend tst-aio6-time64
- mq_timedreceive tst-mqueue{1248}-time64
- mq_timedsend tst-mqueue{1248}-time64
- timer_gettime tst-timer4-time64
- timer_settime tst-timer4-time64
* libanl:
- gai_suspend
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
2021-02-17 18:59:34 +00:00
|
|
|
|
2021-01-20 17:06:56 +00:00
|
|
|
static-only-routines = pthread_atfork
|
2020-06-07 02:03:45 +00:00
|
|
|
|
|
|
|
# Files which must not be linked with libpthread.
|
2023-04-18 15:02:09 +00:00
|
|
|
tests-nolibpthread += \
|
|
|
|
tst-unload \
|
|
|
|
# tests-nolibpthread
|
2020-06-07 02:03:45 +00:00
|
|
|
|
|
|
|
# GCC-4.9 compiles 'sprintf(NULL, ...)' into UD2 on x86_64 without -fno-builtin
|
|
|
|
CFLAGS-tst-cleanup2.c += -fno-builtin
|
|
|
|
CFLAGS-tst-cleanupx2.c += -fno-builtin
|
|
|
|
|
2023-03-17 09:17:28 +00:00
|
|
|
# Disable fortification due to sprintf(NULL,...)
|
|
|
|
CFLAGS-tst-cleanup2.c += $(no-fortify-source)
|
|
|
|
CFLAGS-tst-cleanupx2.c += $(no-fortify-source)
|
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
tests += \
|
|
|
|
tst-cancelx2 \
|
|
|
|
tst-cancelx3 \
|
|
|
|
tst-cancelx4 \
|
|
|
|
tst-cancelx5 \
|
|
|
|
tst-cancelx6 \
|
|
|
|
tst-cancelx8 \
|
|
|
|
tst-cancelx9 \
|
|
|
|
tst-cancelx10 \
|
|
|
|
tst-cancelx11 \
|
|
|
|
tst-cancelx12 \
|
|
|
|
tst-cancelx13 \
|
|
|
|
tst-cancelx14 \
|
|
|
|
tst-cancelx15 \
|
|
|
|
tst-cancelx16 \
|
|
|
|
tst-cancelx18 \
|
|
|
|
tst-cancelx20 \
|
|
|
|
tst-cancelx21 \
|
|
|
|
tst-cleanupx0 \
|
|
|
|
tst-cleanupx1 \
|
|
|
|
tst-cleanupx2 \
|
|
|
|
tst-cleanupx3 \
|
|
|
|
# tests
|
2020-06-07 02:03:45 +00:00
|
|
|
|
2020-06-07 23:32:58 +00:00
|
|
|
ifeq ($(build-shared),yes)
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
tests += \
|
|
|
|
tst-_res1 \
|
2023-04-18 15:02:09 +00:00
|
|
|
tst-atfork2 \
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
tst-atfork3 \
|
|
|
|
tst-atfork4 \
|
2023-04-18 15:02:09 +00:00
|
|
|
tst-create1 \
|
|
|
|
tst-fini1 \
|
|
|
|
tst-pt-tls4 \
|
|
|
|
# tests
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
tests-nolibpthread += \
|
|
|
|
tst-fini1 \
|
|
|
|
# tests-nolibpthread
|
2020-06-07 23:32:58 +00:00
|
|
|
endif
|
|
|
|
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
modules-names += \
|
|
|
|
tst-_res1mod1 \
|
|
|
|
tst-_res1mod2 \
|
2023-04-18 15:02:09 +00:00
|
|
|
tst-atfork2mod \
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
tst-atfork3mod \
|
|
|
|
tst-atfork4mod \
|
2023-04-18 15:02:09 +00:00
|
|
|
tst-create1mod \
|
|
|
|
tst-fini1mod \
|
|
|
|
tst-tls4moda \
|
|
|
|
tst-tls4modb \
|
|
|
|
# modules-names
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
|
2020-06-07 23:32:58 +00:00
|
|
|
test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
|
|
|
|
|
|
|
|
tst-atfork2mod.so-no-z-defs = yes
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
tst-atfork3mod.so-no-z-defs = yes
|
|
|
|
tst-atfork4mod.so-no-z-defs = yes
|
2021-09-15 14:16:19 +00:00
|
|
|
tst-create1mod.so-no-z-defs = yes
|
2020-06-07 23:32:58 +00:00
|
|
|
|
|
|
|
ifeq ($(build-shared),yes)
|
|
|
|
# Build all the modules even when not actually running test programs.
|
|
|
|
tests: $(test-modules)
|
|
|
|
endif
|
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
tests-static += \
|
|
|
|
tst-cancel21-static \
|
|
|
|
tst-locale1 \
|
|
|
|
tst-locale2 \
|
|
|
|
# tests-static
|
2020-06-29 00:14:52 +00:00
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
tests += \
|
|
|
|
tst-cancel21-static \
|
|
|
|
tst-cond11-static \
|
|
|
|
# tests
|
2020-06-07 02:03:45 +00:00
|
|
|
|
|
|
|
# These tests are linked with libc before libpthread
|
2023-04-18 15:02:09 +00:00
|
|
|
tests-reverse += \
|
|
|
|
tst-cancel5 \
|
|
|
|
tst-cancel23 \
|
|
|
|
tst-vfork1x \
|
|
|
|
tst-vfork2x \
|
|
|
|
# tests-reverse
|
2020-06-07 02:03:45 +00:00
|
|
|
|
|
|
|
ifeq ($(run-built-tests),yes)
|
|
|
|
ifeq ($(build-shared),yes)
|
2023-04-18 15:02:09 +00:00
|
|
|
tests-special += \
|
|
|
|
$(objpfx)tst-cleanup0-cmp.out \
|
|
|
|
# tests-special
|
2020-06-07 02:03:45 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-08-06 23:38:27 +00:00
|
|
|
# The sigmask macro is deprecated and triggers are compiler warning
|
|
|
|
# which cannot be suppressed (as of GCC 9).
|
|
|
|
CFLAGS-tst-cancel4.c += -Wno-error
|
|
|
|
CFLAGS-tst-cancel5.c += -Wno-error
|
|
|
|
CFLAGS-tst-cancelx4.c += -Wno-error
|
|
|
|
CFLAGS-tst-cancelx5.c += -Wno-error
|
|
|
|
|
2020-06-07 02:03:45 +00:00
|
|
|
# Run the cancellation and cleanup tests also for the modern, exception-based
|
|
|
|
# implementation. For this we have to pass the -fexceptions parameter.
|
|
|
|
CFLAGS-tst-cancelx2.c += -fexceptions
|
|
|
|
CFLAGS-tst-cancelx3.c += -fexceptions
|
2020-08-06 23:38:27 +00:00
|
|
|
CFLAGS-tst-cancelx4.c += -fexceptions
|
|
|
|
CFLAGS-tst-cancelx5.c += -fexceptions
|
2020-06-10 20:29:21 +00:00
|
|
|
CFLAGS-tst-cancelx6.c += -fexceptions
|
2020-06-07 02:03:45 +00:00
|
|
|
CFLAGS-tst-cancelx8.c += -fexceptions
|
2020-06-14 16:15:39 +00:00
|
|
|
CFLAGS-tst-cancelx9.c += -fexceptions
|
2020-06-07 02:03:45 +00:00
|
|
|
CFLAGS-tst-cancelx10.c += -fexceptions
|
2020-06-10 20:29:21 +00:00
|
|
|
CFLAGS-tst-cancelx11.c += -fexceptions
|
2020-06-07 02:03:45 +00:00
|
|
|
CFLAGS-tst-cancelx12.c += -fexceptions
|
2020-06-23 22:43:32 +00:00
|
|
|
CFLAGS-tst-cancelx13.c += -fexceptions
|
2020-06-07 02:03:45 +00:00
|
|
|
CFLAGS-tst-cancelx14.c += -fexceptions
|
|
|
|
CFLAGS-tst-cancelx15.c += -fexceptions
|
2020-06-29 00:14:52 +00:00
|
|
|
CFLAGS-tst-cancelx16.c += -fexceptions
|
2020-06-07 02:03:45 +00:00
|
|
|
CFLAGS-tst-cancelx18.c += -fexceptions
|
2020-06-29 00:14:52 +00:00
|
|
|
CFLAGS-tst-cancelx20.c += -fexceptions -fasynchronous-unwind-tables
|
2020-06-10 20:29:21 +00:00
|
|
|
CFLAGS-tst-cancelx21.c += -fexceptions -fasynchronous-unwind-tables
|
2020-06-07 02:03:45 +00:00
|
|
|
CFLAGS-tst-cleanupx0.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-tst-cleanupx1.c += -fexceptions -fasynchronous-unwind-tables
|
|
|
|
CFLAGS-tst-cleanupx2.c += -fexceptions
|
|
|
|
CFLAGS-tst-cleanupx3.c += -fexceptions
|
|
|
|
CFLAGS-tst-pt-align.c += $(stack-align-test-flags)
|
|
|
|
CFLAGS-tst-pt-align3.c += $(stack-align-test-flags)
|
|
|
|
|
|
|
|
tst-umask1-ARGS = $(objpfx)tst-umask1.temp
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-atfork2: $(shared-thread-library)
|
2020-06-07 23:32:58 +00:00
|
|
|
LDFLAGS-tst-atfork2 = -rdynamic
|
2021-07-22 13:07:59 +00:00
|
|
|
tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace \
|
|
|
|
LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
|
2020-06-07 23:32:58 +00:00
|
|
|
$(objpfx)tst-atfork2mod.so: $(shared-thread-library)
|
|
|
|
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
$(objpfx)tst-atfork3: $(shared-thread-library)
|
|
|
|
LDFLAGS-tst-atfork3 = -rdynamic
|
|
|
|
$(objpfx)tst-atfork3mod.so: $(shared-thread-library)
|
|
|
|
|
|
|
|
$(objpfx)tst-atfork4: $(shared-thread-library)
|
|
|
|
LDFLAGS-tst-atfork4 = -rdynamic
|
|
|
|
$(objpfx)tst-atfork4mod.so: $(shared-thread-library)
|
|
|
|
|
2020-06-07 23:32:58 +00:00
|
|
|
ifeq ($(build-shared),yes)
|
|
|
|
$(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
|
Fix deadlock when pthread_atfork handler calls pthread_atfork or dlclose
In multi-threaded programs, registering via pthread_atfork,
de-registering implicitly via dlclose, or running pthread_atfork
handlers during fork was protected by an internal lock. This meant
that a pthread_atfork handler attempting to register another handler or
dlclose a dynamically loaded library would lead to a deadlock.
This commit fixes the deadlock in the following way:
During the execution of handlers at fork time, the atfork lock is
released prior to the execution of each handler and taken again upon its
return. Any handler registrations or de-registrations that occurred
during the execution of the handler are accounted for before proceeding
with further handler execution.
If a handler that hasn't been executed yet gets de-registered by another
handler during fork, it will not be executed. If a handler gets
registered by another handler during fork, it will not be executed
during that particular fork.
The possibility that handlers may now be registered or deregistered
during handler execution means that identifying the next handler to be
run after a given handler may register/de-register others requires some
bookkeeping. The fork_handler struct has an additional field, 'id',
which is assigned sequentially during registration. Thus, handlers are
executed in ascending order of 'id' during 'prepare', and descending
order of 'id' during parent/child handler execution after the fork.
Two tests are included:
* tst-atfork3: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This test exercises calling dlclose from prepare, parent, and child
handlers.
* tst-atfork4: This test exercises calling pthread_atfork and dlclose
from the prepare handler.
[BZ #24595, BZ #27054]
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2022-05-24 15:57:36 +00:00
|
|
|
$(objpfx)tst-atfork3.out: $(objpfx)tst-atfork3mod.so
|
|
|
|
$(objpfx)tst-atfork4.out: $(objpfx)tst-atfork4mod.so
|
2020-06-07 23:32:58 +00:00
|
|
|
endif
|
|
|
|
|
2020-06-07 02:03:45 +00:00
|
|
|
ifeq ($(build-shared),yes)
|
|
|
|
$(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0
|
|
|
|
$(make-test-out) > $@ 2>&1; \
|
|
|
|
$(evaluate-test)
|
|
|
|
|
|
|
|
$(objpfx)tst-cleanup0-cmp.out: $(..)sysdeps/pthread/tst-cleanup0.expect $(objpfx)tst-cleanup0.out
|
|
|
|
cmp $^ > $@; \
|
|
|
|
$(evaluate-test)
|
|
|
|
endif
|
|
|
|
|
2021-06-28 07:51:01 +00:00
|
|
|
$(objpfx)tst-cancel28: $(librt)
|
|
|
|
|
2020-06-07 23:32:58 +00:00
|
|
|
$(objpfx)tst-fini1: $(shared-thread-library) $(objpfx)tst-fini1mod.so
|
|
|
|
|
2023-06-14 08:52:06 +00:00
|
|
|
$(objpfx)tst-fini1mod.so: $(libsupport) $(shared-thread-library)
|
2020-06-07 23:32:58 +00:00
|
|
|
|
|
|
|
$(objpfx)tst-_res1mod2.so: $(objpfx)tst-_res1mod1.so
|
|
|
|
LDFLAGS-tst-_res1mod1.so = -Wl,-soname,tst-_res1mod1.so
|
|
|
|
LDFLAGS-tst-_res1mod2.so = -Wl,-soname,tst-_res1mod2.so
|
|
|
|
$(objpfx)tst-_res1: $(objpfx)tst-_res1mod1.so $(objpfx)tst-_res1mod2.so \
|
|
|
|
$(shared-thread-library)
|
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-pt-tls4: $(shared-thread-library)
|
2020-06-07 23:32:58 +00:00
|
|
|
$(objpfx)tst-pt-tls4.out: $(objpfx)tst-tls4moda.so $(objpfx)tst-tls4modb.so
|
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
generated += \
|
|
|
|
tst-atfork2.mtrace \
|
|
|
|
# generated
|
2020-06-07 02:03:45 +00:00
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
generated += \
|
|
|
|
$(addsuffix .so,$(strip $(modules-names))) \
|
|
|
|
$(objpfx)tst-atfork2.mtrace \
|
|
|
|
# generated
|
2020-02-09 16:12:35 +00:00
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
tests-internal += \
|
|
|
|
tst-cancel25 \
|
|
|
|
tst-robust8 \
|
|
|
|
# tests-internal
|
2020-02-16 22:53:38 +00:00
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
tests += \
|
|
|
|
tst-oncex3 \
|
|
|
|
tst-oncex4 \
|
|
|
|
tst-oncey3 \
|
|
|
|
tst-oncey4 \
|
|
|
|
# tests
|
2020-02-09 19:50:21 +00:00
|
|
|
|
2023-04-18 15:02:09 +00:00
|
|
|
modules-names += \
|
|
|
|
tst-join7mod \
|
|
|
|
# modules-names
|
2020-02-10 01:21:46 +00:00
|
|
|
|
2020-02-09 19:17:51 +00:00
|
|
|
ifeq ($(build-shared),yes)
|
2023-04-18 15:02:09 +00:00
|
|
|
tests-static += \
|
|
|
|
tst-cond8-static \
|
|
|
|
# tests-static
|
|
|
|
tests += \
|
|
|
|
tst-cond8-static \
|
|
|
|
# tests
|
2020-02-09 19:17:51 +00:00
|
|
|
endif
|
|
|
|
|
2020-02-09 19:50:21 +00:00
|
|
|
CFLAGS-tst-oncex3.c += -fexceptions
|
|
|
|
CFLAGS-tst-oncex4.c += -fexceptions
|
[PATCH] pthread_once hangs when init routine throws an exception [BZ #18435]
This is another attempt at making pthread_once handle throwing exceptions
from the init routine callback. As the new testcases show, just switching
to the cleanup attribute based cleanup does fix the tst-once5 test, but
breaks the new tst-oncey3 test. That is because when throwing exceptions,
only the unwind info registered cleanups (i.e. C++ destructors or cleanup
attribute), when cancelling threads and there has been unwind info from the
cancellation point up to whatever needs cleanup both unwind info registered
cleanups and THREAD_SETMEM (self, cleanup, ...) registered cleanups are
invoked, but once we hit some frame with no unwind info, only the
THREAD_SETMEM (self, cleanup, ...) registered cleanups are invoked.
So, to stay fully backwards compatible (allow init routines without
unwind info which encounter cancellation points) and handle exception throwing
we actually need to register the pthread_once cleanups in both unwind info
and in the THREAD_SETMEM (self, cleanup, ...) way.
If an exception is thrown, only the former will happen and we in that case
need to also unregister the THREAD_SETMEM (self, cleanup, ...) registered
handler, because otherwise after catching the exception the user code could
call deeper into the stack some cancellation point, get cancelled and then
a stale cleanup handler would clobber stack and probably crash.
If a thread calling init routine is cancelled and unwind info ends before
the pthread_once frame, it will be cleaned up through self->cleanup as
before. And if unwind info is present, unwind_stop first calls the
self->cleanup registered handler for the frame, then it will call the
unwind info registered handler but that will already see __do_it == 0
and do nothing.
2021-03-04 14:15:33 +00:00
|
|
|
CFLAGS-tst-oncey3.c += -fno-exceptions -fno-asynchronous-unwind-tables
|
|
|
|
CFLAGS-tst-oncey4.c += -fno-exceptions -fno-asynchronous-unwind-tables
|
2020-02-09 19:50:21 +00:00
|
|
|
|
2021-06-03 06:26:04 +00:00
|
|
|
$(objpfx)tst-join7: $(shared-thread-library)
|
2020-02-10 01:21:46 +00:00
|
|
|
$(objpfx)tst-join7.out: $(objpfx)tst-join7mod.so
|
|
|
|
$(objpfx)tst-join7mod.so: $(shared-thread-library)
|
|
|
|
LDFLAGS-tst-join7mod.so = -Wl,-soname,tst-join7mod.so
|
|
|
|
|
2020-06-07 02:03:45 +00:00
|
|
|
CFLAGS-tst-unwind-thread.c += -funwind-tables
|
|
|
|
|
2021-09-15 14:16:19 +00:00
|
|
|
LDFLAGS-tst-create1 = -Wl,-export-dynamic
|
|
|
|
$(objpfx)tst-create1: $(shared-thread-library)
|
|
|
|
$(objpfx)tst-create1.out: $(objpfx)tst-create1mod.so
|
|
|
|
|
2020-01-13 19:58:28 +00:00
|
|
|
endif
|