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.
* 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.