aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/nptl/lowlevellock-futex.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-05 17:15:57 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-05 17:19:32 +0200
commitce0b7961ae400e5aeff28d54dc14955199947b74 (patch)
tree3e7acb0eb6915c2c3af747dd9d982d4dc3418b78 /sysdeps/nptl/lowlevellock-futex.h
parent0197c1bc604e1d6357cfa07a75ab73bababa7f0f (diff)
downloadglibc-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 'sysdeps/nptl/lowlevellock-futex.h')
-rw-r--r--sysdeps/nptl/lowlevellock-futex.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/nptl/lowlevellock-futex.h b/sysdeps/nptl/lowlevellock-futex.h
index ca96397..66ebfe5 100644
--- a/sysdeps/nptl/lowlevellock-futex.h
+++ b/sysdeps/nptl/lowlevellock-futex.h
@@ -121,18 +121,18 @@
/* Like lll_futex_wait, but acting as a cancellable entrypoint. */
# define lll_futex_wait_cancel(futexp, val, private) \
({ \
- int __oldtype = CANCEL_ASYNC (); \
+ int __oldtype = LIBC_CANCEL_ASYNC (); \
long int __err = lll_futex_wait (futexp, val, LLL_SHARED); \
- CANCEL_RESET (__oldtype); \
+ LIBC_CANCEL_RESET (__oldtype); \
__err; \
})
/* Like lll_futex_timed_wait, but acting as a cancellable entrypoint. */
# define lll_futex_timed_wait_cancel(futexp, val, timeout, private) \
({ \
- int __oldtype = CANCEL_ASYNC (); \
+ int __oldtype = LIBC_CANCEL_ASYNC (); \
long int __err = lll_futex_timed_wait (futexp, val, timeout, private); \
- CANCEL_RESET (__oldtype); \
+ LIBC_CANCEL_RESET (__oldtype); \
__err; \
})