summaryrefslogtreecommitdiff
path: root/create.c
diff options
context:
space:
mode:
authorrpj <rpj>2001-02-13 07:56:26 +0000
committerrpj <rpj>2001-02-13 07:56:26 +0000
commit4b26627e3f31905f0f739d57947d49995aa81913 (patch)
treed336baa9ce2b1fa7862e81beaf16626be4c2a1af /create.c
parent3208cee87389dbe7479e44208f8c0a4f8725fae8 (diff)
Change the thread cancel lock to be a critical section
instead of a pthread_mutex_t.
Diffstat (limited to 'create.c')
-rw-r--r--create.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/create.c b/create.c
index f342ca4..c99807a 100644
--- a/create.c
+++ b/create.c
@@ -157,7 +157,8 @@ pthread_create (pthread_t * tid,
* This lock will force pthread_threadStart() to wait until we have
* the thread handle.
*/
- (void) pthread_mutex_lock(&thread->cancelLock);
+ InitializeCriticalSection(&thread->cancelLock);
+ EnterCriticalSection(&thread->cancelLock);
thread->threadH = threadH = (HANDLE)
_beginthread (
@@ -182,7 +183,7 @@ pthread_create (pthread_t * tid,
SuspendThread (threadH);
}
- (void) pthread_mutex_unlock(&thread->cancelLock);
+ LeaveCriticalSection(&thread->cancelLock);
#endif /* __MINGW32__ && ! __MSVCRT__ */