X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Tools%2Fnativelib%2Finclude%2Fthreads_int.h;h=08bb4f789fa2ebc56fc316295272c1b11dadd65d;hb=9d6f5fc99aea8a8961413d65d05de1472fb9cd0d;hp=3e85232dd78206a39749ab1d1b06fa649b98e4a1;hpb=d05472ff8f6d8643d40a823e9c07bbe912e4da7d;p=tpg%2Facess2.git diff --git a/Tools/nativelib/include/threads_int.h b/Tools/nativelib/include/threads_int.h index 3e85232d..08bb4f78 100644 --- a/Tools/nativelib/include/threads_int.h +++ b/Tools/nativelib/include/threads_int.h @@ -10,7 +10,9 @@ #include +#ifndef _THREADS_H_ typedef struct sThread tThread; +#endif #define THREAD_EVENT_RWLOCK (1 << 8) @@ -47,7 +49,7 @@ struct sThread tShortSpinlock IsLocked; - uint32_t PendingEvents; + uint32_t EventState; uint32_t WaitingEvents; tThreadIntSem *WaitSemaphore; // pthreads @@ -100,10 +102,13 @@ extern tShortSpinlock glThreadListLock; extern int Threads_int_CreateThread(struct sThread *Thread); extern int Threads_int_ThreadingEnabled(void); -extern tThread *Proc_GetCurThread(void); -extern tThread *Threads_RemActive(void); -extern void Threads_AddActive(tThread *Thread); + +extern struct sThread *Proc_GetCurThread(void); +extern struct sThread *Threads_RemActive(void); +extern void Threads_AddActive(struct sThread *Thread); extern void Threads_int_WaitForStatusEnd(enum eThreadStatus Status); +extern int Threads_int_Sleep(enum eThreadStatus Status, void *Ptr, int Num, struct sThread **ListHead, struct sThread **ListTail, tShortSpinlock *Lock); +extern void Semaphore_ForceWake(struct sThread *Thread); extern tThreadIntMutex *Threads_int_MutexCreate(void); extern void Threads_int_MutexDestroy(tThreadIntMutex *Mutex);