mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
* 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:
@ -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. */
|
||||
|
Reference in New Issue
Block a user