Commit 4fabd150 authored by sof's avatar sof
Browse files

[project @ 2002-02-14 09:00:41 by sof]

make multi-threading story work under win32 also
parent 5e856f00
......@@ -112,8 +112,8 @@ void
initCondition( Condition* pCond )
{
HANDLE h = CreateEvent(NULL,
TRUE, /* manual reset */
TRUE, /* initially signalled */
FALSE, /* auto reset */
FALSE, /* initially not signalled */
NULL); /* unnamed => process-local. */
if ( h == NULL ) {
......@@ -156,6 +156,13 @@ waitCondition ( Condition* pCond, Mutex* pMut )
return rtsTrue;
}
void
yieldThread()
{
Sleep(0);
return;
}
void
shutdownThread()
{
......@@ -174,12 +181,12 @@ int
createOSThread ( OSThreadId* pId, void (*startProc)(void))
{
return _beginthreadex ( NULL, /* default security attributes */
0,
startProcWrapper,
(void*)startProc,
0,
(unsigned*)pId);
return (_beginthreadex ( NULL, /* default security attributes */
0,
startProcWrapper,
(void*)startProc,
0,
(unsigned*)pId) == NULL);
}
OSThreadId
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment