mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
nptl: Move cancel state out of cancelhandling
Now that thread cancellation state is not accessed concurrently anymore, it is possible to move it out the 'cancelhandling'. The code is also simplified: CANCELLATION_P is replaced with a internal pthread_testcancel call and the CANCELSTATE_BIT{MASK} is removed. With this behavior pthread_setcancelstate does not require to act on cancellation if cancel type is asynchronous (is already handled either by pthread_setcanceltype or by the signal handler). Checked on x86_64-linux-gnu and aarch64-linux-gnu.
This commit is contained in:
@@ -79,7 +79,7 @@ __libc_cleanup_pop_restore (struct _pthread_cleanup_buffer *buffer)
|
||||
cancelhandling = curval;
|
||||
}
|
||||
|
||||
CANCELLATION_P (self);
|
||||
__pthread_testcancel ();
|
||||
}
|
||||
}
|
||||
libc_hidden_def (__libc_cleanup_pop_restore)
|
||||
|
Reference in New Issue
Block a user