diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-01-02 11:01:30 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-02 11:01:30 +0000 |
commit | 05df18c3475157cda8126a07b5bb0f52082a0b67 (patch) | |
tree | ad9be04821a2ec180444af2c737d104141857206 /linuxthreads | |
parent | caf7a872326ee21ad20698baa62ca5599a46d866 (diff) | |
download | glibc-05df18c3475157cda8126a07b5bb0f52082a0b67.tar.gz glibc-05df18c3475157cda8126a07b5bb0f52082a0b67.tar.xz glibc-05df18c3475157cda8126a07b5bb0f52082a0b67.zip |
Update.
2003-01-02 Ulrich Drepper <drepper@redhat.com> * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding. * condvar.c: Add symbol versioning. The compatibility versions are the same as the change in the interface does not effect this implementation. * Versions [libpthread]: Add definitions for new pthread_cond_* interfaces for version GLIBC_2.3.2.
Diffstat (limited to 'linuxthreads')
-rw-r--r-- | linuxthreads/ChangeLog | 9 | ||||
-rw-r--r-- | linuxthreads/Versions | 6 | ||||
-rw-r--r-- | linuxthreads/condvar.c | 52 | ||||
-rw-r--r-- | linuxthreads/sysdeps/pthread/bits/pthreadtypes.h | 2 |
4 files changed, 62 insertions, 7 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 20ee770f8f..a667e22ede 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,12 @@ +2003-01-02 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding. + * condvar.c: Add symbol versioning. The compatibility versions + are the same as the change in the interface does not effect this + implementation. + * Versions [libpthread]: Add definitions for new pthread_cond_* + interfaces for version GLIBC_2.3.2. + 2002-12-31 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for diff --git a/linuxthreads/Versions b/linuxthreads/Versions index cf7f340f77..8dd40eec28 100644 --- a/linuxthreads/Versions +++ b/linuxthreads/Versions @@ -156,6 +156,12 @@ libpthread { # Cancellation wrapper __nanosleep; } + GLIBC_2.3.2 { + # Changed pthread_cond_t. + pthread_cond_init; pthread_cond_destroy; + pthread_cond_wait; pthread_cond_timedwait; + pthread_cond_signal; pthread_cond_broadcast; + } GLIBC_PRIVATE { # Internal libc interface to libpthread __pthread_kill_other_threads_np; diff --git a/linuxthreads/condvar.c b/linuxthreads/condvar.c index a40ae49fab..6ab95b88ae 100644 --- a/linuxthreads/condvar.c +++ b/linuxthreads/condvar.c @@ -24,6 +24,7 @@ #include "spinlock.h" #include "queue.h" #include "restart.h" +#include <shlib-compat.h> int __pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *cond_attr) @@ -32,14 +33,26 @@ int __pthread_cond_init(pthread_cond_t *cond, cond->__c_waiting = NULL; return 0; } -strong_alias (__pthread_cond_init, pthread_cond_init) +versioned_symbol (libpthread, __pthread_cond_init, pthread_cond_init, + GLIBC_2_3_2); +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_init, __old_pthread_cond_init) +compat_symbol (libpthread, __old_pthread_cond_init, pthread_cond_init, + GLIBC_2_0); +#endif int __pthread_cond_destroy(pthread_cond_t *cond) { if (cond->__c_waiting != NULL) return EBUSY; return 0; } -strong_alias (__pthread_cond_destroy, pthread_cond_destroy) +versioned_symbol (libpthread, __pthread_cond_destroy, pthread_cond_destroy, + GLIBC_2_3_2); +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_destroy, __old_pthread_cond_destroy) +compat_symbol (libpthread, __old_pthread_cond_destroy, pthread_cond_destroy, + GLIBC_2_0); +#endif /* Function called by pthread_cancel to remove the thread from waiting on a condition variable queue. */ @@ -134,7 +147,13 @@ int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) pthread_mutex_lock(mutex); return 0; } -strong_alias (__pthread_cond_wait, pthread_cond_wait) +versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait, + GLIBC_2_3_2); +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_wait, __old_pthread_cond_wait) +compat_symbol (libpthread, __old_pthread_cond_wait, pthread_cond_wait, + GLIBC_2_0); +#endif static int pthread_cond_timedwait_relative(pthread_cond_t *cond, @@ -230,12 +249,19 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, return 0; } -int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - const struct timespec * abstime) +int __pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec * abstime) { /* Indirect call through pointer! */ return pthread_cond_timedwait_relative(cond, mutex, abstime); } +versioned_symbol (libpthread, __pthread_cond_timedwait, pthread_cond_timedwait, + GLIBC_2_3_2); +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_timedwait, __old_pthread_cond_timedwait) +compat_symbol (libpthread, __old_pthread_cond_timedwait, + pthread_cond_timedwait, GLIBC_2_0); +#endif int __pthread_cond_signal(pthread_cond_t *cond) { @@ -251,7 +277,13 @@ int __pthread_cond_signal(pthread_cond_t *cond) } return 0; } -strong_alias (__pthread_cond_signal, pthread_cond_signal) +versioned_symbol (libpthread, __pthread_cond_signal, pthread_cond_signal, + GLIBC_2_3_2); +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_signal, __old_pthread_cond_signal) +compat_symbol (libpthread, __old_pthread_cond_signal, pthread_cond_signal, + GLIBC_2_0); +#endif int __pthread_cond_broadcast(pthread_cond_t *cond) { @@ -270,7 +302,13 @@ int __pthread_cond_broadcast(pthread_cond_t *cond) } return 0; } -strong_alias (__pthread_cond_broadcast, pthread_cond_broadcast) +versioned_symbol (libpthread, __pthread_cond_broadcast, pthread_cond_broadcast, + GLIBC_2_3_2); +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) +strong_alias (__pthread_cond_broadcast, __old_pthread_cond_broadcast) +compat_symbol (libpthread, __old_pthread_cond_broadcast, + pthread_cond_broadcast, GLIBC_2_0); +#endif int __pthread_condattr_init(pthread_condattr_t *attr) { diff --git a/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h b/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h index 3ee5c48134..43d4f7dc00 100644 --- a/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h +++ b/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h @@ -57,6 +57,8 @@ typedef struct { struct _pthread_fastlock __c_lock; /* Protect against concurrent access */ _pthread_descr __c_waiting; /* Threads waiting on this condition */ + char __padding[48 - sizeof (struct _pthread_fastlock) + - sizeof (_pthread_descr)]; } pthread_cond_t; |