nptl: Use pthread_kill on pthread_cancel
It consolidates the tgkill call and it is the first step of making pthread_cancel async-signal-safe. It also fix a possible issue where the 'struct pthread' tid is not read atomically, which might send an invalid cancellation signal (similar to what db988e50 fixed for pthread_join). Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Loading
Please register or sign in to comment