diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-05-18 18:41:24 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-05-18 18:41:24 +0200 |
commit | 6a8ccc95528f5e86a8770ed15ce89609b5b3dee9 (patch) | |
tree | bbd4df35b4d4a6a8b00d7a5e61fb2668b850ad62 /libpthread/linuxthreads/condvar.c | |
parent | 398a27a5b323956344b4f831d892fed3bd9813c7 (diff) |
remove linuxthreads.new, rename linuxthreads.old
Linuxthreads.new isn't really useful with the existence
of NPTL/TLS for well supported architectures. There is no
reason to use LT.new for ARM/MIPS or other architectures
supporting NPTL/TLS. It is not available for noMMU architectures
like Blackfin or FR-V. To simplify the live of the few uClibc-ng
developers, LT.new is removed and LT.old is renamed to LT.
LINUXTHREADS_OLD -> UCLIBC_HAS_LINUXTHREADS
Diffstat (limited to 'libpthread/linuxthreads/condvar.c')
-rw-r--r-- | libpthread/linuxthreads/condvar.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/libpthread/linuxthreads/condvar.c b/libpthread/linuxthreads/condvar.c index d7b2e9886..35daacf15 100644 --- a/libpthread/linuxthreads/condvar.c +++ b/libpthread/linuxthreads/condvar.c @@ -25,28 +25,28 @@ #include "queue.h" #include "restart.h" -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 attribute_unused) { __pthread_init_lock(&cond->__c_lock); cond->__c_waiting = NULL; return 0; } -strong_alias (__pthread_cond_init, pthread_cond_init) +libpthread_hidden_def(pthread_cond_init) -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; } -strong_alias (__pthread_cond_destroy, pthread_cond_destroy) +libpthread_hidden_def(pthread_cond_destroy) /* Function called by pthread_cancel to remove the thread from waiting on a condition variable queue. */ static int cond_extricate_func(void *obj, pthread_descr th) { - __volatile__ pthread_descr self = thread_self(); + volatile pthread_descr self = thread_self(); pthread_cond_t *cond = obj; int did_remove = 0; @@ -57,9 +57,9 @@ 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(); + volatile pthread_descr self = thread_self(); pthread_extricate_if extr; int already_canceled = 0; int spurious_wakeup_count; @@ -98,7 +98,7 @@ int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } - pthread_mutex_unlock(mutex); + __pthread_mutex_unlock(mutex); spurious_wakeup_count = 0; while (1) @@ -123,7 +123,7 @@ int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) if (THREAD_GETMEM(self, p_woken_by_cancel) && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) { THREAD_SETMEM(self, p_woken_by_cancel, 0); - pthread_mutex_lock(mutex); + __pthread_mutex_lock(mutex); __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } @@ -131,17 +131,17 @@ int __pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) while (spurious_wakeup_count--) restart(self); - pthread_mutex_lock(mutex); + __pthread_mutex_lock(mutex); return 0; } -strong_alias (__pthread_cond_wait, pthread_cond_wait) +libpthread_hidden_def(pthread_cond_wait) static int pthread_cond_timedwait_relative(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec * abstime) { - __volatile__ pthread_descr self = thread_self(); + volatile pthread_descr self = thread_self(); int already_canceled = 0; pthread_extricate_if extr; int spurious_wakeup_count; @@ -174,7 +174,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } - pthread_mutex_unlock(mutex); + __pthread_mutex_unlock(mutex); spurious_wakeup_count = 0; while (1) @@ -191,7 +191,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, if (was_on_queue) { __pthread_set_own_extricate_if(self, 0); - pthread_mutex_lock(mutex); + __pthread_mutex_lock(mutex); return ETIMEDOUT; } @@ -218,7 +218,7 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, if (THREAD_GETMEM(self, p_woken_by_cancel) && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) { THREAD_SETMEM(self, p_woken_by_cancel, 0); - pthread_mutex_lock(mutex); + __pthread_mutex_lock(mutex); __pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME); } @@ -226,19 +226,19 @@ pthread_cond_timedwait_relative(pthread_cond_t *cond, while (spurious_wakeup_count--) restart(self); - pthread_mutex_lock(mutex); + __pthread_mutex_lock(mutex); 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); } -strong_alias (__pthread_cond_timedwait, pthread_cond_timedwait) +libpthread_hidden_def(pthread_cond_timedwait) -int __pthread_cond_signal(pthread_cond_t *cond) +int pthread_cond_signal(pthread_cond_t *cond) { pthread_descr th; @@ -252,9 +252,9 @@ int __pthread_cond_signal(pthread_cond_t *cond) } return 0; } -strong_alias (__pthread_cond_signal, pthread_cond_signal) +libpthread_hidden_def(pthread_cond_signal) -int __pthread_cond_broadcast(pthread_cond_t *cond) +int pthread_cond_broadcast(pthread_cond_t *cond) { pthread_descr tosignal, th; @@ -271,27 +271,27 @@ int __pthread_cond_broadcast(pthread_cond_t *cond) } return 0; } -strong_alias (__pthread_cond_broadcast, pthread_cond_broadcast) +libpthread_hidden_def(pthread_cond_broadcast) -int __pthread_condattr_init(pthread_condattr_t *attr) +int pthread_condattr_init(pthread_condattr_t *attr attribute_unused) { return 0; } -strong_alias (__pthread_condattr_init, pthread_condattr_init) +libpthread_hidden_def(pthread_condattr_init) -int __pthread_condattr_destroy(pthread_condattr_t *attr) +int pthread_condattr_destroy(pthread_condattr_t *attr attribute_unused) { return 0; } -strong_alias (__pthread_condattr_destroy, pthread_condattr_destroy) +libpthread_hidden_def(pthread_condattr_destroy) -int pthread_condattr_getpshared (const pthread_condattr_t *attr, int *pshared) +int pthread_condattr_getpshared (const pthread_condattr_t *attr attribute_unused, int *pshared) { *pshared = PTHREAD_PROCESS_PRIVATE; return 0; } -int pthread_condattr_setpshared (pthread_condattr_t *attr, int pshared) +int pthread_condattr_setpshared (pthread_condattr_t *attr attribute_unused, int pshared) { if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED) return EINVAL; |