summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/semaphore.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads.old/semaphore.c')
-rw-r--r--libpthread/linuxthreads.old/semaphore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpthread/linuxthreads.old/semaphore.c b/libpthread/linuxthreads.old/semaphore.c
index 10b609c4a..a44f52411 100644
--- a/libpthread/linuxthreads.old/semaphore.c
+++ b/libpthread/linuxthreads.old/semaphore.c
@@ -23,6 +23,7 @@
#include "restart.h"
#include "queue.h"
+int __new_sem_init(sem_t *sem, int pshared, unsigned int value);
int __new_sem_init(sem_t *sem, int pshared, unsigned int value)
{
if (value > SEM_VALUE_MAX) {
@@ -55,6 +56,7 @@ static int new_sem_extricate_func(void *obj, pthread_descr th)
return did_remove;
}
+int __new_sem_wait(sem_t * sem);
int __new_sem_wait(sem_t * sem)
{
volatile pthread_descr self = thread_self();
@@ -117,6 +119,7 @@ int __new_sem_wait(sem_t * sem)
return 0;
}
+int __new_sem_trywait(sem_t * sem);
int __new_sem_trywait(sem_t * sem)
{
int retval;
@@ -133,6 +136,7 @@ int __new_sem_trywait(sem_t * sem)
return retval;
}
+int __new_sem_post(sem_t * sem);
int __new_sem_post(sem_t * sem)
{
pthread_descr self = thread_self();
@@ -174,12 +178,14 @@ int __new_sem_post(sem_t * sem)
return 0;
}
+int __new_sem_getvalue(sem_t * sem, int * sval);
int __new_sem_getvalue(sem_t * sem, int * sval)
{
*sval = sem->__sem_value;
return 0;
}
+int __new_sem_destroy(sem_t * sem);
int __new_sem_destroy(sem_t * sem)
{
if (sem->__sem_waiting != NULL) {