nativelib - Compile fixes
[tpg/acess2.git] / Tools / nativelib / include / threads_int.h
index eb5f9df..cc0c3e0 100644 (file)
@@ -8,6 +8,9 @@
 #ifndef _THREADS_INT_H_
 #define _THREADS_INT_H_
 
+typedef struct sThreadIntMutex tThreadIntMutex;        // actually pthreads
+typedef struct sThreadIntSem   tThreadIntSem;
+
 struct sProcess
 {
        struct sProcess *Next;
@@ -24,10 +27,12 @@ struct sThread
 {
        struct sThread  *Next;
         int    TID;
-       
+
+       tThreadIntMutex *Protector;
+
        uint32_t        PendingEvents;
        uint32_t        WaitingEvents;
-       void    *WaitSemaphore; // pthreads
+       tThreadIntSem   *WaitSemaphore; // pthreads
        
        // Init Only
        void    (*SpawnFcn)(void*);
@@ -36,5 +41,16 @@ struct sThread
 
 extern int     Threads_int_CreateThread(struct sThread *Thread);
 
+extern tThreadIntMutex *Threads_int_MutexCreate(void);
+extern void    Threads_int_MutexDestroy(tThreadIntMutex *Mutex);
+extern void    Threads_int_MutexLock(tThreadIntMutex *Mutex);
+extern void    Threads_int_MutexRelease(tThreadIntMutex *Mutex);
+
+extern tThreadIntSem   *Threads_int_SemCreate(void);
+extern void    Threads_int_SemDestroy(tThreadIntSem *Sem);
+extern void    Threads_int_SemSignal(tThreadIntSem *Sem);
+extern void    Threads_int_SemWait(tThreadIntSem *Sem);
+extern void    Threads_int_SemWaitAll(tThreadIntSem *Sem);
+
 #endif
 

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