diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-05-05 17:15:57 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-05-05 17:19:32 +0200 |
commit | ce0b7961ae400e5aeff28d54dc14955199947b74 (patch) | |
tree | 3e7acb0eb6915c2c3af747dd9d982d4dc3418b78 /nptl/Makefile | |
parent | 0197c1bc604e1d6357cfa07a75ab73bababa7f0f (diff) | |
download | glibc-ce0b7961ae400e5aeff28d54dc14955199947b74.zip glibc-ce0b7961ae400e5aeff28d54dc14955199947b74.tar.gz glibc-ce0b7961ae400e5aeff28d54dc14955199947b74.tar.bz2 |
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>
Diffstat (limited to 'nptl/Makefile')
-rw-r--r-- | nptl/Makefile | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index 884cb69..1337b9e 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -30,6 +30,7 @@ extra-libs-others := $(extra-libs) routines = \ alloca_cutoff \ + cancellation \ cleanup_compat \ cleanup_defer_compat \ cleanup_routine \ @@ -39,7 +40,6 @@ routines = \ elision-trylock \ elision-unlock \ futex-internal \ - libc-cancellation \ libc-cleanup \ libc_multiple_threads \ libc_pthread_init \ @@ -157,7 +157,6 @@ shared-only-routines = forward static-only-routines = pthread_atfork libpthread-routines = \ - cancellation \ cleanup \ cleanup_defer \ events \ @@ -239,7 +238,6 @@ CFLAGS-pthread_setcanceltype.c += -fexceptions -fasynchronous-unwind-tables # These are internal functions which similar functionality as setcancelstate # and setcanceltype. CFLAGS-cancellation.c += -fasynchronous-unwind-tables -CFLAGS-libc-cancellation.c += -fasynchronous-unwind-tables # Calling pthread_exit() must cause the registered cancel handlers to # be executed. Therefore exceptions have to be thrown through this |