projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Windows DLLs: remove dup symbol from def file
[ghc-hetmet.git]
/
rts
/
win32
/
OSThreads.c
diff --git
a/rts/win32/OSThreads.c
b/rts/win32/OSThreads.c
index
13a3666
..
4103469
100644
(file)
--- a/
rts/win32/OSThreads.c
+++ b/
rts/win32/OSThreads.c
@@
-11,7
+11,6
@@
#include "Rts.h"
#if defined(THREADED_RTS)
#include "Rts.h"
#if defined(THREADED_RTS)
-#include "OSThreads.h"
#include "RtsUtils.h"
#include <windows.h>
#include "RtsUtils.h"
#include <windows.h>
@@
-95,6
+94,7
@@
void
shutdownThread()
{
_endthreadex(0);
shutdownThread()
{
_endthreadex(0);
+ barf("_endthreadex returned"); // avoid gcc warning
}
int
}
int
@@
-232,12
+232,24
@@
forkOS_createThread ( HsStablePtr entry )
(unsigned*)&pId) == 0);
}
(unsigned*)&pId) == 0);
}
-void CCallEnterCriticalSection(LPCRITICAL_SECTION s) {
- EnterCriticalSection(s);
+nat
+getNumberOfProcessors (void)
+{
+ static nat nproc = 0;
+
+ if (nproc == 0) {
+ SYSTEM_INFO si;
+ GetSystemInfo(&si);
+ nproc = si.dwNumberOfProcessors;
+ }
+
+ return nproc;
}
}
-void CCallLeaveCriticalSection(LPCRITICAL_SECTION s) {
- LeaveCriticalSection(s);
+void
+setThreadAffinity (nat n STG_UNUSED, nat m STG_UNUSED)
+{
+ /* ToDo */
}
#else /* !defined(THREADED_RTS) */
}
#else /* !defined(THREADED_RTS) */