projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add closeMutex and use it on clean up
[ghc-hetmet.git]
/
rts
/
win32
/
OSThreads.c
diff --git
a/rts/win32/OSThreads.c
b/rts/win32/OSThreads.c
index
c772be3
..
00effda
100644
(file)
--- a/
rts/win32/OSThreads.c
+++ b/
rts/win32/OSThreads.c
@@
-116,6
+116,11
@@
initMutex (Mutex* pMut)
{
InitializeCriticalSectionAndSpinCount(pMut,4000);
}
{
InitializeCriticalSectionAndSpinCount(pMut,4000);
}
+void
+closeMutex (Mutex* pMut)
+{
+ DeleteCriticalSection(pMut);
+}
#else
void
initMutex (Mutex* pMut)
#else
void
initMutex (Mutex* pMut)
@@
-127,6
+132,11
@@
initMutex (Mutex* pMut)
*pMut = h;
return;
}
*pMut = h;
return;
}
+void
+closeMutex (Mutex* pMut)
+{
+ CloseHandle(*pMut);
+}
#endif
void
#endif
void