1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* 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.
This commit is contained in:
Ulrich Drepper
2003-02-14 18:33:54 +00:00
parent 700bf7af9f
commit e320ef46a7
8 changed files with 179 additions and 18 deletions

View File

@ -130,7 +130,7 @@ sigcancel_handler (int sig __attribute ((unused)))
is already set but if the signal is directly send (internally or
from another process) is has to be done here. */
int oldval = THREAD_GETMEM (self, cancelhandling);
int newval = oldval | CANCELED_BITMASK;
int newval = oldval | CANCELING_BITMASK | CANCELED_BITMASK;
if (oldval == newval || (oldval & EXITING_BITMASK) != 0)
/* Already canceled or exiting. */