projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2002-04-19 10:25:00 by simonmar]
[ghc-hetmet.git]
/
ghc
/
rts
/
OSThreads.c
diff --git
a/ghc/rts/OSThreads.c
b/ghc/rts/OSThreads.c
index
16a4ca1
..
01e0a25
100644
(file)
--- a/
ghc/rts/OSThreads.c
+++ b/
ghc/rts/OSThreads.c
@@
-112,8
+112,8
@@
void
initCondition( Condition* pCond )
{
HANDLE h = CreateEvent(NULL,
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 ) {
NULL); /* unnamed => process-local. */
if ( h == NULL ) {
@@
-157,6
+157,13
@@
waitCondition ( Condition* pCond, Mutex* pMut )
}
void
}
void
+yieldThread()
+{
+ Sleep(0);
+ return;
+}
+
+void
shutdownThread()
{
_endthreadex(0);
shutdownThread()
{
_endthreadex(0);
@@
-171,15
+178,15
@@
startProcWrapper(void* pReal)
}
int
}
int
-createOSThread ( OSThreadId* pId, void (*startProc)(void*))
+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) == 0);
}
OSThreadId
}
OSThreadId