diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-05-25 14:31:30 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-09 15:16:45 -0300 |
commit | 26cfbb7162ad364d53d69f6d482f2d87b5950524 (patch) | |
tree | 5e5bf4bafe92016bb5a520e5069b3e6e712d6e80 /nptl/allocatestack.c | |
parent | 41c72956179a8ed730d1ac8198015934398fe72b (diff) | |
download | glibc-26cfbb7162ad364d53d69f6d482f2d87b5950524.tar glibc-26cfbb7162ad364d53d69f6d482f2d87b5950524.tar.gz glibc-26cfbb7162ad364d53d69f6d482f2d87b5950524.tar.bz2 glibc-26cfbb7162ad364d53d69f6d482f2d87b5950524.zip |
nptl: Remove CANCELING_BITMASK
The CANCELING_BITMASK is used as an optimization to avoid sending
the signal when pthread_cancel is called in a concurrent manner.
This requires then to put both the cancellation state and type on a
shared state (cancelhandling), since 'pthread_cancel' checks whether
cancellation is enabled and asynchrnous to either cancel itself of
sending the signal.
It also requires handle the CANCELING_BITMASK on
__pthread_disable_asynccancel, however this incurs in the same issues
described on BZ#12683: the cancellation is acted upon even *after*
syscall returns with user visible side-effects.
This patch removes this optimization and simplifies the pthread
cancellation implementation: pthread_cancel now first checks if
cancellation is already pending and if not always, sends a signal
if the target is not itself. The SIGCANCEL handler is also simpified
since there is not need to setup a CAS loop.
It also allows to move both the cancellation state and mode out of
'cancelhadling' (it is done in subsequent patches).
Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Diffstat (limited to 'nptl/allocatestack.c')
0 files changed, 0 insertions, 0 deletions