[Glibc-bsd-commits] r5947 - in trunk/glibc-ports-2.23: fbtl fbtl/sysdeps/pthread kfreebsd/fbtl
aurel32 at alioth.debian.org
aurel32 at alioth.debian.org
Sat Mar 19 23:36:50 UTC 2016
Author: aurel32
Date: 2016-03-19 23:36:50 +0000 (Sat, 19 Mar 2016)
New Revision: 5947
Modified:
trunk/glibc-ports-2.23/fbtl/forward.c
trunk/glibc-ports-2.23/fbtl/nptl-init.c
trunk/glibc-ports-2.23/fbtl/pthreadP.h
trunk/glibc-ports-2.23/fbtl/pthread_setcancelstate.c
trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/libc-lockP.h
trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/pthread-functions.h
trunk/glibc-ports-2.23/kfreebsd/fbtl/fatal-prepare.h
Log:
Merge from upstream:
commit e5d19c08d12880edbdf8772c8fb1f747c71d866e
Author: H.J. Lu <hjl.tools at gmail.com>
Date: Thu Sep 17 16:38:54 2015 -0700
Use __pthread_setcancelstate in libc.a
This patch references __pthread_setcancelstate instead of
pthread_setcancelstate in libc.a.
Modified: trunk/glibc-ports-2.23/fbtl/forward.c
===================================================================
--- trunk/glibc-ports-2.23/fbtl/forward.c 2016-03-19 21:06:33 UTC (rev 5946)
+++ trunk/glibc-ports-2.23/fbtl/forward.c 2016-03-19 23:36:50 UTC (rev 5947)
@@ -197,8 +197,9 @@
FORWARD2 (pthread_self, pthread_t, (void), (), return 0)
-FORWARD (pthread_setcancelstate, (int state, int *oldstate), (state, oldstate),
- 0)
+FORWARD (__pthread_setcancelstate, (int state, int *oldstate),
+ (state, oldstate), 0)
+strong_alias (__pthread_setcancelstate, pthread_setcancelstate)
FORWARD (pthread_setcanceltype, (int type, int *oldtype), (type, oldtype), 0)
Modified: trunk/glibc-ports-2.23/fbtl/nptl-init.c
===================================================================
--- trunk/glibc-ports-2.23/fbtl/nptl-init.c 2016-03-19 21:06:33 UTC (rev 5946)
+++ trunk/glibc-ports-2.23/fbtl/nptl-init.c 2016-03-19 23:36:50 UTC (rev 5947)
@@ -125,7 +125,7 @@
.ptr_pthread_mutex_lock = __pthread_mutex_lock,
.ptr_pthread_mutex_unlock = __pthread_mutex_unlock,
.ptr_pthread_self = __pthread_self,
- .ptr_pthread_setcancelstate = __pthread_setcancelstate,
+ .ptr___pthread_setcancelstate = __pthread_setcancelstate,
.ptr_pthread_setcanceltype = __pthread_setcanceltype,
.ptr___pthread_cleanup_upto = __pthread_cleanup_upto,
.ptr___pthread_once = __pthread_once,
Modified: trunk/glibc-ports-2.23/fbtl/pthreadP.h
===================================================================
--- trunk/glibc-ports-2.23/fbtl/pthreadP.h 2016-03-19 21:06:33 UTC (rev 5946)
+++ trunk/glibc-ports-2.23/fbtl/pthreadP.h 2016-03-19 23:36:50 UTC (rev 5947)
@@ -507,6 +507,7 @@
hidden_proto (__pthread_getspecific)
hidden_proto (__pthread_setspecific)
hidden_proto (__pthread_once)
+hidden_proto (__pthread_setcancelstate)
#endif
extern int __pthread_cond_broadcast_2_0 (pthread_cond_2_0_t *cond);
Modified: trunk/glibc-ports-2.23/fbtl/pthread_setcancelstate.c
===================================================================
--- trunk/glibc-ports-2.23/fbtl/pthread_setcancelstate.c 2016-03-19 21:06:33 UTC (rev 5946)
+++ trunk/glibc-ports-2.23/fbtl/pthread_setcancelstate.c 2016-03-19 23:36:50 UTC (rev 5947)
@@ -70,3 +70,4 @@
return 0;
}
strong_alias (__pthread_setcancelstate, pthread_setcancelstate)
+hidden_def (__pthread_setcancelstate)
Modified: trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/libc-lockP.h
===================================================================
--- trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/libc-lockP.h 2016-03-19 21:06:33 UTC (rev 5946)
+++ trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/libc-lockP.h 2016-03-19 23:36:50 UTC (rev 5947)
@@ -376,6 +376,7 @@
void (*__parent) (void),
void (*__child) (void));
+extern int __pthread_setcancelstate (int state, int *oldstate);
/* Make the pthread functions weak so that we can elide them from
@@ -403,9 +404,9 @@
weak_extern (__pthread_once)
weak_extern (__pthread_initialize)
weak_extern (__pthread_atfork)
+weak_extern (__pthread_setcancelstate)
weak_extern (_pthread_cleanup_push_defer)
weak_extern (_pthread_cleanup_pop_restore)
-weak_extern (pthread_setcancelstate)
# else
# pragma weak __pthread_mutex_init
# pragma weak __pthread_mutex_destroy
@@ -427,9 +428,9 @@
# pragma weak __pthread_once
# pragma weak __pthread_initialize
# pragma weak __pthread_atfork
+# pragma weak __pthread_setcancelstate
# pragma weak _pthread_cleanup_push_defer
# pragma weak _pthread_cleanup_pop_restore
-# pragma weak pthread_setcancelstate
# endif
#endif
Modified: trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/pthread-functions.h
===================================================================
--- trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/pthread-functions.h 2016-03-19 21:06:33 UTC (rev 5946)
+++ trunk/glibc-ports-2.23/fbtl/sysdeps/pthread/pthread-functions.h 2016-03-19 23:36:50 UTC (rev 5947)
@@ -75,7 +75,7 @@
int (*ptr_pthread_mutex_lock) (pthread_mutex_t *);
int (*ptr_pthread_mutex_unlock) (pthread_mutex_t *);
pthread_t (*ptr_pthread_self) (void);
- int (*ptr_pthread_setcancelstate) (int, int *);
+ int (*ptr___pthread_setcancelstate) (int, int *);
int (*ptr_pthread_setcanceltype) (int, int *);
void (*ptr___pthread_cleanup_upto) (__jmp_buf, char *);
int (*ptr___pthread_once) (pthread_once_t *, void (*) (void));
Modified: trunk/glibc-ports-2.23/kfreebsd/fbtl/fatal-prepare.h
===================================================================
--- trunk/glibc-ports-2.23/kfreebsd/fbtl/fatal-prepare.h 2016-03-19 21:06:33 UTC (rev 5946)
+++ trunk/glibc-ports-2.23/kfreebsd/fbtl/fatal-prepare.h 2016-03-19 23:36:50 UTC (rev 5947)
@@ -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)
More information about the Glibc-bsd-commits
mailing list