summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/condvar.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds_cb1@t-online.de>2007-11-22 16:55:08 +0000
committerBernd Schmidt <bernds_cb1@t-online.de>2007-11-22 16:55:08 +0000
commitacadc5664e7f056e27c95d88522a573c1ed5cc49 (patch)
tree8ab6bd479cbcf9c44f6acd9ff57f4a2c29179475 /libpthread/linuxthreads.old/condvar.c
parent90f1927f14e9cdbae37981af728af8e727838069 (diff)
Add hidden symbols for a number of pthread functions, and use them to ensure
that all entries in the __pthread_functions point to functions within libpthread, not identically-named functions in libc.
Diffstat (limited to 'libpthread/linuxthreads.old/condvar.c')
-rw-r--r--libpthread/linuxthreads.old/condvar.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libpthread/linuxthreads.old/condvar.c b/libpthread/linuxthreads.old/condvar.c
index 3d77f781a..23e71393c 100644
--- a/libpthread/linuxthreads.old/condvar.c
+++ b/libpthread/linuxthreads.old/condvar.c
@@ -25,6 +25,16 @@
#include "queue.h"
#include "restart.h"
+libpthread_hidden_proto(pthread_cond_broadcast)
+libpthread_hidden_proto(pthread_cond_destroy)
+libpthread_hidden_proto(pthread_cond_init)
+libpthread_hidden_proto(pthread_cond_signal)
+libpthread_hidden_proto(pthread_cond_wait)
+libpthread_hidden_proto(pthread_cond_timedwait)
+
+libpthread_hidden_proto(pthread_condattr_destroy)
+libpthread_hidden_proto(pthread_condattr_init)
+
int pthread_cond_init(pthread_cond_t *cond,
const pthread_condattr_t *cond_attr attribute_unused)
{
@@ -32,12 +42,14 @@ int pthread_cond_init(pthread_cond_t *cond,
cond->__c_waiting = NULL;
return 0;
}
+libpthread_hidden_def(pthread_cond_init)
int pthread_cond_destroy(pthread_cond_t *cond)
{
if (cond->__c_waiting != NULL) return EBUSY;
return 0;
}
+libpthread_hidden_def(pthread_cond_destroy)
/* Function called by pthread_cancel to remove the thread from
waiting on a condition variable queue. */
@@ -132,6 +144,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
__pthread_mutex_lock(mutex);
return 0;
}
+libpthread_hidden_def(pthread_cond_wait)
static int
pthread_cond_timedwait_relative(pthread_cond_t *cond,
@@ -233,6 +246,7 @@ int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
/* Indirect call through pointer! */
return pthread_cond_timedwait_relative(cond, mutex, abstime);
}
+libpthread_hidden_def(pthread_cond_timedwait)
int pthread_cond_signal(pthread_cond_t *cond)
{
@@ -248,6 +262,7 @@ int pthread_cond_signal(pthread_cond_t *cond)
}
return 0;
}
+libpthread_hidden_def(pthread_cond_signal)
int pthread_cond_broadcast(pthread_cond_t *cond)
{
@@ -266,16 +281,19 @@ int pthread_cond_broadcast(pthread_cond_t *cond)
}
return 0;
}
+libpthread_hidden_def(pthread_cond_broadcast)
int pthread_condattr_init(pthread_condattr_t *attr attribute_unused)
{
return 0;
}
+libpthread_hidden_def(pthread_condattr_init)
int pthread_condattr_destroy(pthread_condattr_t *attr attribute_unused)
{
return 0;
}
+libpthread_hidden_def(pthread_condattr_destroy)
int pthread_condattr_getpshared (const pthread_condattr_t *attr attribute_unused, int *pshared)
{