summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/condvar.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/condvar.c')
-rw-r--r--libpthread/linuxthreads/condvar.c60
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;