aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/pthreadP.h13
-rw-r--r--nptl/pthread_mutex_timedlock.c52
4 files changed, 53 insertions, 20 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 573dfd0..31d05b3 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -100,6 +100,7 @@ routines = \
pthread_mutex_init \
pthread_mutex_lock \
pthread_mutex_setprioceiling \
+ pthread_mutex_timedlock \
pthread_mutex_unlock \
pthread_once \
pthread_rwlock_rdlock \
@@ -160,7 +161,6 @@ libpthread-routines = \
pthread_getname \
pthread_join \
pthread_join_common \
- pthread_mutex_timedlock \
pthread_mutex_trylock \
pthread_mutexattr_destroy \
pthread_mutexattr_getprioceiling \
diff --git a/nptl/Versions b/nptl/Versions
index 33ffc5b..ddf3bbb 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -63,6 +63,7 @@ libc {
__pthread_rwlock_rdlock;
__pthread_rwlock_unlock;
__pthread_rwlock_wrlock;
+ pthread_mutex_timedlock;
}
GLIBC_2.2.3 {
pthread_getattr_np;
@@ -102,6 +103,7 @@ libc {
}
GLIBC_2.30 {
pthread_cond_clockwait;
+ pthread_mutex_clocklock;
}
GLIBC_2.32 {
pthread_attr_getsigmask_np;
@@ -126,6 +128,7 @@ libc {
pthread_key_create;
pthread_key_delete;
pthread_kill;
+ pthread_mutex_clocklock;
pthread_mutex_consistent;
pthread_mutex_getprioceiling;
pthread_mutex_setprioceiling;
@@ -174,6 +177,7 @@ libc {
__pthread_getattr_default_np;
__pthread_key_delete;
__pthread_keys;
+ __pthread_mutex_timedlock;
__pthread_mutex_unlock_usercnt;
__pthread_setcancelstate;
__pthread_tpp_change_priority;
@@ -275,7 +279,6 @@ libpthread {
pthread_condattr_getpshared;
pthread_condattr_setpshared;
pthread_getcpuclockid;
- pthread_mutex_timedlock;
pthread_mutexattr_getpshared;
pthread_mutexattr_setpshared;
pthread_rwlock_timedrdlock;
@@ -373,7 +376,6 @@ libpthread {
}
GLIBC_2.30 {
- pthread_mutex_clocklock;
pthread_rwlock_clockrdlock;
pthread_rwlock_clockwrlock;
sem_clockwait;
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index af76361..0def617 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -516,10 +516,10 @@ libpthread_hidden_proto (__pthread_rwlock_timedwrlock64)
extern int __pthread_mutex_clocklock64 (pthread_mutex_t *mutex,
clockid_t clockid,
const struct __timespec64 *abstime);
-libpthread_hidden_proto (__pthread_mutex_clocklock64)
+libc_hidden_proto (__pthread_mutex_clocklock64)
extern int __pthread_mutex_timedlock64 (pthread_mutex_t *mutex,
const struct __timespec64 *abstime);
-libpthread_hidden_proto (__pthread_mutex_timedlock64)
+libc_hidden_proto (__pthread_mutex_timedlock64)
#endif
extern int __pthread_cond_timedwait (pthread_cond_t *cond,
@@ -532,6 +532,15 @@ extern int __pthread_cond_clockwait (pthread_cond_t *cond,
const struct timespec *abstime)
__nonnull ((1, 2, 4));
libc_hidden_proto (__pthread_cond_clockwait)
+
+extern int __pthread_mutex_clocklock (pthread_mutex_t *mutex,
+ clockid_t clockid,
+ const struct timespec *abstime);
+libc_hidden_proto (__pthread_mutex_clocklock)
+extern int __pthread_mutex_timedlock (pthread_mutex_t *mutex,
+ const struct timespec *abstime);
+libc_hidden_proto (__pthread_mutex_timedlock)
+
extern int __pthread_condattr_destroy (pthread_condattr_t *attr);
extern int __pthread_condattr_init (pthread_condattr_t *attr);
extern int __pthread_key_create (pthread_key_t *key, void (*destr) (void *));
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index 5e52a4d..b9cc0a2 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -571,9 +571,9 @@ __pthread_mutex_clocklock_common (pthread_mutex_t *mutex,
}
int
-__pthread_mutex_clocklock64 (pthread_mutex_t *mutex,
- clockid_t clockid,
- const struct __timespec64 *abstime)
+___pthread_mutex_clocklock64 (pthread_mutex_t *mutex,
+ clockid_t clockid,
+ const struct __timespec64 *abstime)
{
if (__glibc_unlikely (!futex_abstimed_supported_clockid (clockid)))
return EINVAL;
@@ -582,39 +582,61 @@ __pthread_mutex_clocklock64 (pthread_mutex_t *mutex,
return __pthread_mutex_clocklock_common (mutex, clockid, abstime);
}
-#if __TIMESIZE != 64
-libpthread_hidden_def (__pthread_mutex_clocklock64)
+#if __TIMESIZE == 64
+strong_alias (___pthread_mutex_clocklock64, ___pthread_mutex_clocklock)
+#else /* __TIMESPEC64 != 64 */
+libc_hidden_ver (___pthread_mutex_clocklock64, __pthread_mutex_clocklock64)
int
-__pthread_mutex_clocklock (pthread_mutex_t *mutex,
- clockid_t clockid,
- const struct timespec *abstime)
+___pthread_mutex_clocklock (pthread_mutex_t *mutex,
+ clockid_t clockid,
+ const struct timespec *abstime)
{
struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime);
- return __pthread_mutex_clocklock64 (mutex, clockid, &ts64);
+ return ___pthread_mutex_clocklock64 (mutex, clockid, &ts64);
}
+#endif /* __TIMESPEC64 != 64 */
+versioned_symbol (libc, ___pthread_mutex_clocklock,
+ __pthread_mutex_clocklock, GLIBC_PRIVATE);
+libc_hidden_ver (___pthread_mutex_clocklock, __pthread_mutex_clocklock)
+versioned_symbol (libc, ___pthread_mutex_clocklock,
+ pthread_mutex_clocklock, GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_mutex_clocklock,
+ pthread_mutex_clocklock, GLIBC_2_30);
#endif
-weak_alias (__pthread_mutex_clocklock, pthread_mutex_clocklock)
int
-__pthread_mutex_timedlock64 (pthread_mutex_t *mutex,
+___pthread_mutex_timedlock64 (pthread_mutex_t *mutex,
const struct __timespec64 *abstime)
{
LIBC_PROBE (mutex_timedlock_entry, 2, mutex, abstime);
return __pthread_mutex_clocklock_common (mutex, CLOCK_REALTIME, abstime);
}
-#if __TIMESIZE != 64
-libpthread_hidden_def (__pthread_mutex_timedlock64)
+#if __TIMESIZE == 64
+strong_alias (___pthread_mutex_timedlock64, ___pthread_mutex_timedlock)
+#else /* __TIMESPEC64 != 64 */
+versioned_symbol (libc, ___pthread_mutex_timedlock64,
+ __pthread_mutex_timedlock64, GLIBC_PRIVATE);
+libc_hidden_ver (___pthread_mutex_timedlock64, __pthread_mutex_timedlock64)
int
-__pthread_mutex_timedlock (pthread_mutex_t *mutex,
+___pthread_mutex_timedlock (pthread_mutex_t *mutex,
const struct timespec *abstime)
{
struct __timespec64 ts64 = valid_timespec_to_timespec64 (*abstime);
return __pthread_mutex_timedlock64 (mutex, &ts64);
}
+#endif /* __TIMESPEC64 != 64 */
+versioned_symbol (libc, ___pthread_mutex_timedlock,
+ __pthread_mutex_timedlock, GLIBC_PRIVATE);
+libc_hidden_ver (___pthread_mutex_timedlock, __pthread_mutex_timedlock)
+versioned_symbol (libc, ___pthread_mutex_timedlock,
+ pthread_mutex_timedlock, GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libpthread, ___pthread_mutex_timedlock,
+ pthread_mutex_timedlock, GLIBC_2_2);
#endif
-weak_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)