about summary refs log tree commit diff
path: root/nptl/tst-join5.c
Commit message (Collapse)AuthorAgeFilesLines
* pthread: Move some join tests from nptl to sysdeps/pthreadSamuel Thibault2020-02-101-191/+0
| | | | So they can be checked with htl too.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* nptl: Add pthread_clockjoin_npMike Crowe2019-11-011-7/+15
| | | | | | | | | | | Introduce pthread_clockjoin_np as a version of pthread_timedjoin_np that accepts a clockid_t parameter to indicate which clock the timeout should be measured against. This mirrors the recently-added POSIX-proposed "clock" wait functions. Checked on x86_64-linux-gnu. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* nptl: Reinstate pthread_timedjoin_np as a cancellation point (BZ#24215)Adhemerval Zanella2019-02-141-58/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch ce7eb0e90315 ("nptl: Cleanup cancellation macros") changed the join sequence for internal common __pthread_timedjoin_ex to use the new macro lll_wait_tid. The idea was this macro would issue the cancellable futex operation depending whether the timeout is used or not. However if a timeout is used, __lll_timedwait_tid is called and it is not a cancellable entrypoint. This patch fixes it by simplifying the code in various ways: - Instead of adding the cancellation handling on __lll_timedwait_tid, it moves the generic implementation to pthread_join_common.c (called now timedwait_tid with some fixes to use the correct type for pid). - The llvm_wait_tid macro is removed, along with its replication on x86_64, i686, and sparc arch-specific lowlevellock.h. - sparc32 __lll_timedwait_tid is also removed, since the code is similar to generic one. - x86_64 and i386 provides arch-specific __lll_timedwait_tid which is also removed since they are similar in functionality to generic C code and there is no indication it is better than compiler generated code. New tests, tst-join8 and tst-join9, are provided to check if pthread_timedjoin_np acts as a cancellation point. Checked on x86_64-linux-gnu, i686-linux-gnu, sparcv9-linux-gnu, and aarch64-linux-gnu. [BZ #24215] * nptl/Makefile (lpthread-routines): Remove lll_timedwait_tid. (tests): Add tst-join8 tst-join9. * nptl/lll_timedwait_tid.c: Remove file. * sysdeps/sparc/sparc32/lll_timedwait_tid.c: Likewise. * sysdeps/unix/sysv/linux/i386/lll_timedwait_tid.c: Likewise. * sysdeps/sysv/linux/x86_64/lll_timedwait_tid.c: Likewise. * nptl/pthread_join_common.c (timedwait_tid): New function. (__pthread_timedjoin_ex): Act as cancellation entrypoint is block is set. * nptl/tst-join5.c (thread_join): New function. (tf1, tf2, do_test): Use libsupport and add pthread_timedjoin_np check. * nptl/tst-join8.c: New file. * nptl/tst-join9.c: Likewise. * sysdeps/nptl/lowlevellock-futex.h (lll_futex_wait_cancel, lll_futex_timed_wait_cancel): Add generic macros. * sysdeps/nptl/lowlevellock.h (__lll_timedwait_tid, lll_wait_tid): Remove definitions. * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/sparc/sparc32/lowlevellock.c (__lll_timedwait_tid): Remove function. * sysdeps/unix/sysv/linux/i386/lowlevellock.S (__lll_timedwait_tid): Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise. * sysdeps/unix/sysv/linux/lowlevellock-futex.h (lll_futex_timed_wait_cancel): New macro.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Clean up nptl/tst-join5 use of nanosleep.Roland McGrath2015-02-061-7/+7
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Update copyright notices with scripts/update-copyrightsAllan McRae2014-01-011-1/+1
|
* Update copyright notices with scripts/update-copyrights.Joseph Myers2013-01-021-1/+1
|
* Replace FSF snail mail address with URLs.Paul Eggert2012-02-091-3/+2
|
* [BZ #2843]Ulrich Drepper2006-08-131-24/+91
| | | | | | | | | | | | | 2006-08-12 Ulrich Drepper <drepper@redhat.com> [BZ #2843] * pthread_join.c (pthread_join): Account for self being canceled when checking for deadlocks. * tst-join5.c: Cleanups. Allow to be used in tst-join6. (tf1): Don't print anything after pthread_join returns, this would be another cancellation point. (tf2): Likewise. * tst-join6.c: New file. * Makefile (tests): Add tst-join6.
* (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.Ulrich Drepper2004-12-221-91/+24
|
* 2.5-18.1Jakub Jelinek2007-07-121-24/+91
|
* * tst-join5.c (tf1, tf2): Add a cast.Roland McGrath2003-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Makeconfig (includes): Append -I$(..)nptl to this variable. * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]: Don't test anything. * tst-cond4.c: Likewise. * tst-cond6.c: Likewise. * tst-flock2.c: Likewise. * tst-mutex4.c: Likewise. * tst-rwlock4.c: Likewise. * tst-signal1.c: Likewise. * tst-spin2.c: Likewise. * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise. * tst-mutex4.c: Use test-skeleton.c. * tst-spin2.c: Likewise. * tst-sysconf.c: Likewise. * tst-barrier2.c: Likewise. * tst-cond4.c: Likewise. * tst-cond6.c: Likewise. * tst-rwlock4.c: Likewise. * tst-unload.c: Likewise. * tst-flock2.c (do_test): Use return instead of exit.
* Update.Ulrich Drepper2003-02-141-0/+141
* descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK. * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval. * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT if asynchronous canceling is enabled. * pthread_join.c (pthread_join): When recognizing circular joins, take into account the other thread might be already canceled. * Makefile (tests): Add tst-join5. * tst-join5.c: New file.