aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-09-17 16:38:54 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-09-17 16:38:54 -0700
commite5d19c08d12880edbdf8772c8fb1f747c71d866e (patch)
tree92bf00b39e906a7b60b259758a91b675085a1a62 /sysdeps/unix
parent61f893789862db1dfdf188f77cd215bab0814d2c (diff)
downloadglibc-e5d19c08d12880edbdf8772c8fb1f747c71d866e.zip
glibc-e5d19c08d12880edbdf8772c8fb1f747c71d866e.tar.gz
glibc-e5d19c08d12880edbdf8772c8fb1f747c71d866e.tar.bz2
Use __pthread_setcancelstate in libc.a
This patch references __pthread_setcancelstate instead of pthread_setcancelstate in libc.a. [BZ #18970] * misc/error.c (error): Replace pthread_setcancelstate with __pthread_setcancelstate. (error_at_line): Likewise. * posix/wordexp.c (parse_comm): Likewise. * stdlib/fmtmsg.c (fmtmsg): Likewise. * nptl/forward.c (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. (pthread_setcancelstate): Add an alias. * nptl/nptl-init.c (pthread_functions): Replace ptr_pthread_setcancelstate with ptr___pthread_setcancelstate. * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise. * nptl/pthreadP.h (__pthread_setcancelstate): Mark it with hidden_proto. * nptl/pthread_setcancelstate.c (__pthread_setcancelstate): Mark it with hidden_def. * sysdeps/nptl/libc-lockP.h (__pthread_setcancelstate): New. (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Use __libc_ptf_call with __pthread_setcancelstate.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/fatal-prepare.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/sysdeps/unix/sysv/linux/fatal-prepare.h b/sysdeps/unix/sysv/linux/fatal-prepare.h
index 45d88ce..2a89567 100644
--- a/sysdeps/unix/sysv/linux/fatal-prepare.h
+++ b/sysdeps/unix/sysv/linux/fatal-prepare.h
@@ -19,19 +19,6 @@
/* We have to completely disable cancellation. assert() must not be a
cancellation point but the implementation uses write() etc. */
-#ifdef SHARED
-# include <pthread-functions.h>
-# define FATAL_PREPARE \
- { \
- if (__libc_pthread_functions_init) \
- PTHFCT_CALL (ptr_pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, \
- NULL)); \
- }
-#else
-# pragma weak pthread_setcancelstate
-# define FATAL_PREPARE \
- { \
- if (pthread_setcancelstate != NULL) \
- pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); \
- }
-#endif
+#define FATAL_PREPARE \
+ __libc_ptf_call (__pthread_setcancelstate, \
+ (PTHREAD_CANCEL_DISABLE, NULL), 0)