diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 8 | ||||
-rw-r--r-- | nptl/Versions | 3 | ||||
-rw-r--r-- | nptl/forward.c | 13 | ||||
-rw-r--r-- | nptl/init.c | 2 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/pthread-functions.h | 5 |
5 files changed, 30 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 3ad2323a6a..b27479fbe0 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -21,6 +21,14 @@ * tst-tls5modf.c: New. * tst-tls6.sh: New test. + * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add + ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0. + * init.c (pthread_functions): Initialize them. + * forward.c (pthread_cond_timedwait@GLIBC_2.0, + pthread_cond_timedwait@@GLIBC_2.3.2): New forwards. + * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0, + pthread_cond_timedwait@@GLIBC_2.3.2. + 2003-09-01 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file. diff --git a/nptl/Versions b/nptl/Versions index 8eb863d0f4..611ed9b7bc 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -9,6 +9,7 @@ libc { pthread_condattr_destroy; pthread_condattr_init; pthread_cond_broadcast; pthread_cond_destroy; pthread_cond_init; pthread_cond_signal; pthread_cond_wait; + pthread_cond_timedwait; pthread_equal; pthread_exit; pthread_getschedparam; pthread_setschedparam; pthread_mutex_destroy; pthread_mutex_init; @@ -23,7 +24,7 @@ libc { # Changed pthread_cond_t. pthread_cond_init; pthread_cond_destroy; pthread_cond_wait; pthread_cond_signal; - pthread_cond_broadcast; + pthread_cond_broadcast; pthread_cond_timedwait; } GLIBC_PRIVATE { # Internal libc interface to libpthread diff --git a/nptl/forward.c b/nptl/forward.c index 1f4cd482c6..407fd092d9 100644 --- a/nptl/forward.c +++ b/nptl/forward.c @@ -136,6 +136,19 @@ FORWARD (__pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex), versioned_symbol (libc, __pthread_cond_wait, pthread_cond_wait, GLIBC_2_3_2); +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +FORWARD (__pthread_cond_timedwait_2_0, + (pthread_cond_2_0_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime), (cond, mutex, abstime), 0) +compat_symbol (libc, __pthread_cond_timedwait_2_0, pthread_cond_timedwait, + GLIBC_2_0); +#endif +FORWARD (__pthread_cond_timedwait, + (pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec *abstime), (cond, mutex, abstime), 0) +versioned_symbol (libc, __pthread_cond_timedwait, pthread_cond_timedwait, + GLIBC_2_3_2); + FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2), (thread1, thread2), 1) diff --git a/nptl/init.c b/nptl/init.c index c7d26acff7..7b8b2b0c54 100644 --- a/nptl/init.c +++ b/nptl/init.c @@ -95,12 +95,14 @@ static struct pthread_functions pthread_functions = .ptr___pthread_cond_init = __pthread_cond_init, .ptr___pthread_cond_signal = __pthread_cond_signal, .ptr___pthread_cond_wait = __pthread_cond_wait, + .ptr___pthread_cond_timedwait = __pthread_cond_timedwait, # if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) .ptr___pthread_cond_broadcast_2_0 = __pthread_cond_broadcast_2_0, .ptr___pthread_cond_destroy_2_0 = __pthread_cond_destroy_2_0, .ptr___pthread_cond_init_2_0 = __pthread_cond_init_2_0, .ptr___pthread_cond_signal_2_0 = __pthread_cond_signal_2_0, .ptr___pthread_cond_wait_2_0 = __pthread_cond_wait_2_0, + .ptr___pthread_cond_timedwait_2_0 = __pthread_cond_timedwait_2_0, # endif .ptr_pthread_equal = __pthread_equal, .ptr___pthread_exit = __pthread_exit, diff --git a/nptl/sysdeps/pthread/pthread-functions.h b/nptl/sysdeps/pthread/pthread-functions.h index 93ba089982..38155e240f 100644 --- a/nptl/sysdeps/pthread/pthread-functions.h +++ b/nptl/sysdeps/pthread/pthread-functions.h @@ -52,12 +52,17 @@ struct pthread_functions const pthread_condattr_t *); int (*ptr___pthread_cond_signal) (pthread_cond_t *); int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *); + int (*ptr___pthread_cond_timedwait) (pthread_cond_t *, pthread_mutex_t *, + const struct timespec *); int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_2_0_t *); int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_2_0_t *); int (*ptr___pthread_cond_init_2_0) (pthread_cond_2_0_t *, const pthread_condattr_t *); int (*ptr___pthread_cond_signal_2_0) (pthread_cond_2_0_t *); int (*ptr___pthread_cond_wait_2_0) (pthread_cond_2_0_t *, pthread_mutex_t *); + int (*ptr___pthread_cond_timedwait_2_0) (pthread_cond_2_0_t *, + pthread_mutex_t *, + const struct timespec *); int (*ptr_pthread_equal) (pthread_t, pthread_t); void (*ptr___pthread_exit) (void *); int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *); |