X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FOSThreads.h;h=f9af6c408c1bcfa0ae3e6a2d3ba2f37a3947e520;hb=8ab093423360990fc108d86098fc6bfb3b555269;hp=90431445b7befaf93a4d200a2405a5a54d1937fa;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/includes/OSThreads.h b/includes/OSThreads.h index 9043144..f9af6c4 100644 --- a/includes/OSThreads.h +++ b/includes/OSThreads.h @@ -73,6 +73,8 @@ typedef pthread_key_t ThreadLocalKey; typedef HANDLE Condition; typedef DWORD OSThreadId; +// don't be tempted to use HANDLE as the OSThreadId: there can be +// many HANDLES to a given thread, so comparison would not work. typedef DWORD ThreadLocalKey; #define OSThreadProcAttr __stdcall @@ -146,6 +148,7 @@ typedef void OSThreadProcAttr OSThreadProc(void *); extern int createOSThread ( OSThreadId* tid, OSThreadProc *startProc, void *param); +extern rtsBool osThreadIsAlive ( OSThreadId id ); // // Condition Variables @@ -161,6 +164,7 @@ extern rtsBool waitCondition ( Condition* pCond, // Mutexes // extern void initMutex ( Mutex* pMut ); +extern void closeMutex ( Mutex* pMut ); // // Thread-local storage