2 * Acess2 libnative (Kernel Simulation Library)
3 * - By John Hodge (thePowersGang)
6 * - Threads handling definitions
8 #ifndef _THREADS_INT_H_
9 #define _THREADS_INT_H_
11 typedef struct sThreadIntMutex tThreadIntMutex; // actually pthreads
12 typedef struct sThreadIntSem tThreadIntSem;
16 struct sProcess *Next;
32 tThreadIntMutex *Protector;
34 uint32_t PendingEvents;
35 uint32_t WaitingEvents;
36 tThreadIntSem *WaitSemaphore; // pthreads
39 void (*SpawnFcn)(void*);
43 extern int Threads_int_CreateThread(struct sThread *Thread);
45 extern tThreadIntMutex *Threads_int_MutexCreate(void);
46 extern void Threads_int_MutexDestroy(tThreadIntMutex *Mutex);
47 extern void Threads_int_MutexLock(tThreadIntMutex *Mutex);
48 extern void Threads_int_MutexRelease(tThreadIntMutex *Mutex);
50 extern tThreadIntSem *Threads_int_SemCreate(void);
51 extern void Threads_int_SemDestroy(tThreadIntSem *Sem);
52 extern void Threads_int_SemSignal(tThreadIntSem *Sem);
53 extern void Threads_int_SemWait(tThreadIntSem *Sem);
54 extern void Threads_int_SemWaitAll(tThreadIntSem *Sem);