From ce0b7961ae400e5aeff28d54dc14955199947b74 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 5 May 2021 17:15:57 +0200 Subject: 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 --- sysdeps/unix/sysv/linux/socketcall.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'sysdeps/unix/sysv/linux/socketcall.h') diff --git a/sysdeps/unix/sysv/linux/socketcall.h b/sysdeps/unix/sysv/linux/socketcall.h index 07702fc4f1..3084623216 100644 --- a/sysdeps/unix/sysv/linux/socketcall.h +++ b/sysdeps/unix/sysv/linux/socketcall.h @@ -89,11 +89,6 @@ }) -#if IS_IN (libc) -# define __pthread_enable_asynccancel __libc_enable_asynccancel -# define __pthread_disable_asynccancel __libc_disable_asynccancel -#endif - #define SOCKETCALL_CANCEL(name, args...) \ ({ \ int oldtype = LIBC_CANCEL_ASYNC (); \ -- cgit v1.2.3-70-g09d2