mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
nptl: Consolidate async cancel enable/disable implementation in libc
Previously, the source file nptl/cancellation.c was compiled multiple times, for libc, libpthread, librt. This commit switches to a single implementation, with new __pthread_enable_asynccancel@@GLIBC_PRIVATE, __pthread_disable_asynccancel@@GLIBC_PRIVATE exports. The almost-unused CANCEL_ASYNC and CANCEL_RESET macros are replaced by LIBC_CANCEL_ASYNC and LIBC_CANCEL_ASYNC macros. They call the __pthread_* functions unconditionally now. The macros are still needed because shared code uses them; Hurd has different definitions. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -567,8 +567,6 @@ libc_hidden_proto (__pthread_exit)
|
||||
extern int __pthread_join (pthread_t threadid, void **thread_return);
|
||||
extern int __pthread_setcanceltype (int type, int *oldtype);
|
||||
libc_hidden_proto (__pthread_setcanceltype)
|
||||
extern int __pthread_enable_asynccancel (void) attribute_hidden;
|
||||
extern void __pthread_disable_asynccancel (int oldtype) attribute_hidden;
|
||||
extern void __pthread_testcancel (void);
|
||||
libc_hidden_proto (__pthread_testcancel)
|
||||
extern int __pthread_clockjoin_ex (pthread_t, void **, clockid_t,
|
||||
|
Reference in New Issue
Block a user