summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/semaphore.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-26 22:30:50 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-26 22:30:50 +0000
commitdfb199421b130157ef9154acb932d80b35fa2894 (patch)
treebf16be20c6ffb3cb09b889c036cc7085e3146ed3 /libpthread/linuxthreads.old/semaphore.c
parent1466eb283c8eee992835f66433c43fd4d31e92bc (diff)
prototypes for threads too
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) {