diff options
Diffstat (limited to 'libpthread/linuxthreads/condvar.c')
-rw-r--r-- | libpthread/linuxthreads/condvar.c | 103 |
1 files changed, 14 insertions, 89 deletions
diff --git a/libpthread/linuxthreads/condvar.c b/libpthread/linuxthreads/condvar.c index b051afd4c..f9c46a331 100644 --- a/libpthread/linuxthreads/condvar.c +++ b/libpthread/linuxthreads/condvar.c @@ -25,52 +25,19 @@ #include "queue.h" #include "restart.h" -/* glibc uses strong aliases, we wont bother */ -#undef strong_alias -#define strong_alias(sym, alias) -#define __pthread_cond_init pthread_cond_init -#define __pthread_cond_destroy pthread_cond_destroy -#define __pthread_cond_wait pthread_cond_wait -#define __pthread_cond_timedwait pthread_cond_timedwait -#define __pthread_cond_signal pthread_cond_signal -#define __pthread_cond_broadcast pthread_cond_broadcast -#define __pthread_condattr_init pthread_condattr_init -#define __pthread_condattr_destroy pthread_condattr_destroy - - -int __pthread_cond_init(pthread_cond_t *cond, - const pthread_condattr_t *cond_attr) +int pthread_cond_init(pthread_cond_t *cond, + const pthread_condattr_t *cond_attr) { __pthread_init_lock(&cond->__c_lock); cond->__c_waiting = NULL; return 0; } -/* Don't bother with this version stuff in uClibc */ -#if 0 -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 -#endif - -int __pthread_cond_destroy(pthread_cond_t *cond) + +int pthread_cond_destroy(pthread_cond_t *cond) { if (cond->__c_waiting != NULL) return EBUSY; return 0; } -/* Don't bother with this version stuff in uClibc */ -#if 0 -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 -#endif /* Function called by pthread_cancel to remove the thread from waiting on a condition variable queue. */ @@ -88,7 +55,7 @@ static int cond_extricate_func(void *obj, pthread_descr th) return did_remove; } -int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) +int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { volatile pthread_descr self = thread_self(); pthread_extricate_if extr; @@ -165,16 +132,6 @@ int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) pthread_mutex_lock(mutex); return 0; } -/* Don't bother with this version stuff in uClibc */ -#if 0 -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 -#endif static int pthread_cond_timedwait_relative(pthread_cond_t *cond, @@ -270,24 +227,14 @@ 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); } -/* Don't bother with this version stuff in uClibc */ -#if 0 -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 -#endif - -int __pthread_cond_signal(pthread_cond_t *cond) + +int pthread_cond_signal(pthread_cond_t *cond) { pthread_descr th; @@ -301,18 +248,8 @@ int __pthread_cond_signal(pthread_cond_t *cond) } return 0; } -/* Don't bother with this version stuff in uClibc */ -#if 0 -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 -#endif - -int __pthread_cond_broadcast(pthread_cond_t *cond) + +int pthread_cond_broadcast(pthread_cond_t *cond) { pthread_descr tosignal, th; @@ -329,28 +266,16 @@ int __pthread_cond_broadcast(pthread_cond_t *cond) } return 0; } -/* Don't bother with this version stuff in uClibc */ -#if 0 -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 -#endif - -int __pthread_condattr_init(pthread_condattr_t *attr) + +int pthread_condattr_init(pthread_condattr_t *attr) { return 0; } -strong_alias (__pthread_condattr_init, pthread_condattr_init) -int __pthread_condattr_destroy(pthread_condattr_t *attr) +int pthread_condattr_destroy(pthread_condattr_t *attr) { return 0; } -strong_alias (__pthread_condattr_destroy, pthread_condattr_destroy) int pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared) { |