Tools/nativelib - Threading fixes
[tpg/acess2.git] / Tools / nativelib / include / pthread_weak.h
1 /*
2  * Acess2 libnative (Kernel Simulation Library)
3  * - By John Hodge (thePowersGang)
4  *
5  * pthread_weak.h
6  * - Weakly linked copies of pthread_* and sem_*
7  */
8 #ifndef _PTHREAD_WEAK_H
9 #define _PTHREAD_WEAK_H
10 #include <pthread.h>
11 #include <semaphore.h>
12
13 extern int pthread_create (pthread_t*, const pthread_attr_t*, void* (*)(void*), void*) __attribute__ ((weak));
14 extern int pthread_mutex_init (pthread_mutex_t*, const pthread_mutexattr_t*) __attribute__ ((weak));
15 extern int pthread_mutex_lock (pthread_mutex_t*) __attribute__ ((weak));
16 extern int pthread_mutex_unlock (pthread_mutex_t*) __attribute__ ((weak));
17 extern int pthread_mutex_destroy (pthread_mutex_t*) __attribute__ ((weak));
18
19 extern int sem_init(sem_t *sem, int pshared, unsigned int value) __attribute__ ((weak));
20 extern int sem_wait(sem_t *sem) __attribute__ ((weak));
21 extern int sem_trywait(sem_t *sem) __attribute__ ((weak));
22 extern int sem_post(sem_t *sem) __attribute__ ((weak));
23 extern int sem_getvalue(sem_t *sem, int *sval) __attribute__ ((weak));
24
25 #endif

UCC git Repository :: git.ucc.asn.au