summaryrefslogtreecommitdiff
path: root/linuxthreads/oldsemaphore.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-22 08:01:35 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-22 08:01:35 +0000
commitef7dddd01c9b2c2e6e676c023b9b6ae63ae9e49d (patch)
tree6f95b7b9c141fb01f711138c8a2ea84a34c80d2d /linuxthreads/oldsemaphore.c
parent1ab1ea76bf65a1cf97dd734a75a08e1d79913b37 (diff)
Update.
* sysdeps/unix/sysv/linux/errlist.c: Likewise.
Diffstat (limited to 'linuxthreads/oldsemaphore.c')
-rw-r--r--linuxthreads/oldsemaphore.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/linuxthreads/oldsemaphore.c b/linuxthreads/oldsemaphore.c
index 62d2812693..c6f44cfce2 100644
--- a/linuxthreads/oldsemaphore.c
+++ b/linuxthreads/oldsemaphore.c
@@ -19,6 +19,8 @@
/* GNU Library General Public License for more details. */
/* Semaphores a la POSIX 1003.1b */
+#include <shlib-compat.h>
+#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
#include <errno.h>
#include "pthread.h"
@@ -90,7 +92,7 @@ int __old_sem_wait(old_sem_t * sem)
while (1) {
/* Register extrication interface */
- __pthread_set_own_extricate_if(self, &extr);
+ __pthread_set_own_extricate_if(self, &extr);
do {
oldstatus = sem->sem_status;
if ((oldstatus & 1) && (oldstatus != 1))
@@ -103,12 +105,12 @@ int __old_sem_wait(old_sem_t * sem)
while (! sem_compare_and_swap(sem, oldstatus, newstatus));
if (newstatus & 1) {
/* We got the semaphore. */
- __pthread_set_own_extricate_if(self, 0);
+ __pthread_set_own_extricate_if(self, 0);
return 0;
}
/* Wait for sem_post or cancellation */
suspend(self);
- __pthread_set_own_extricate_if(self, 0);
+ __pthread_set_own_extricate_if(self, 0);
/* This is a cancellation point */
if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {
@@ -224,11 +226,11 @@ static void sem_restart_list(pthread_descr waiting)
}
}
-#if defined PIC && DO_VERSIONING
symbol_version (__old_sem_init, sem_init, GLIBC_2.0);
symbol_version (__old_sem_wait, sem_wait, GLIBC_2.0);
symbol_version (__old_sem_trywait, sem_trywait, GLIBC_2.0);
symbol_version (__old_sem_post, sem_post, GLIBC_2.0);
symbol_version (__old_sem_getvalue, sem_getvalue, GLIBC_2.0);
symbol_version (__old_sem_destroy, sem_destroy, GLIBC_2.0);
+
#endif