diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-03-22 08:01:35 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-03-22 08:01:35 +0000 |
commit | ef7dddd01c9b2c2e6e676c023b9b6ae63ae9e49d (patch) | |
tree | 6f95b7b9c141fb01f711138c8a2ea84a34c80d2d /linuxthreads/semaphore.c | |
parent | 1ab1ea76bf65a1cf97dd734a75a08e1d79913b37 (diff) | |
download | glibc-ef7dddd01c9b2c2e6e676c023b9b6ae63ae9e49d.tar.gz glibc-ef7dddd01c9b2c2e6e676c023b9b6ae63ae9e49d.tar.xz glibc-ef7dddd01c9b2c2e6e676c023b9b6ae63ae9e49d.zip |
Update.
* sysdeps/unix/sysv/linux/errlist.c: Likewise.
Diffstat (limited to 'linuxthreads/semaphore.c')
-rw-r--r-- | linuxthreads/semaphore.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/linuxthreads/semaphore.c b/linuxthreads/semaphore.c index 0297b3a1e3..c4a4f6e042 100644 --- a/linuxthreads/semaphore.c +++ b/linuxthreads/semaphore.c @@ -21,6 +21,7 @@ #include "spinlock.h" #include "restart.h" #include "queue.h" +#include <shlib-compat.h> int __new_sem_init(sem_t *sem, int pshared, unsigned int value) { @@ -71,7 +72,7 @@ int __new_sem_wait(sem_t * sem) return 0; } /* Register extrication interface */ - __pthread_set_own_extricate_if(self, &extr); + __pthread_set_own_extricate_if(self, &extr); /* Enqueue only if not already cancelled. */ if (!(THREAD_GETMEM(self, p_canceled) && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE)) @@ -81,13 +82,13 @@ int __new_sem_wait(sem_t * sem) __pthread_unlock((struct _pthread_fastlock *) &sem->__sem_lock); if (already_canceled) { - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); pthread_exit(PTHREAD_CANCELED); - } + } /* Wait for sem_post or cancellation, or fall through if already canceled */ suspend(self); - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); /* Terminate only if the wakeup came from cancellation. */ /* Otherwise ignore cancellation because we got the semaphore. */ @@ -189,21 +190,9 @@ int sem_unlink(const char *name) return -1; } -#if defined PIC && DO_VERSIONING -default_symbol_version (__new_sem_init, sem_init, GLIBC_2.1); -default_symbol_version (__new_sem_wait, sem_wait, GLIBC_2.1); -default_symbol_version (__new_sem_trywait, sem_trywait, GLIBC_2.1); -default_symbol_version (__new_sem_post, sem_post, GLIBC_2.1); -default_symbol_version (__new_sem_getvalue, sem_getvalue, GLIBC_2.1); -default_symbol_version (__new_sem_destroy, sem_destroy, GLIBC_2.1); -#else -# ifdef weak_alias -weak_alias (__new_sem_init, sem_init) -weak_alias (__new_sem_wait, sem_wait) -weak_alias (__new_sem_trywait, sem_trywait) -weak_alias (__new_sem_post, sem_post) -weak_alias (__new_sem_getvalue, sem_getvalue) -weak_alias (__new_sem_destroy, sem_destroy) -# endif -#endif - +versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_getvalue, sem_getvalue, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_destroy, sem_destroy, GLIBC_2_1); |