X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fwin32%2FOSThreads.c;h=410346916bddde9122bbd95a906fac5cdb602ce7;hb=8ae8c865716e0ee03383ddfae58ab778ce527412;hp=ed5c968cf1cfd6a609a16e3693680e769a9b1603;hpb=b09ab92b65983635c68c8944631b1d53e9b71e42;p=ghc-hetmet.git diff --git a/rts/win32/OSThreads.c b/rts/win32/OSThreads.c index ed5c968..4103469 100644 --- a/rts/win32/OSThreads.c +++ b/rts/win32/OSThreads.c @@ -11,7 +11,6 @@ #include "Rts.h" #if defined(THREADED_RTS) -#include "OSThreads.h" #include "RtsUtils.h" #include @@ -95,6 +94,7 @@ void shutdownThread() { _endthreadex(0); + barf("_endthreadex returned"); // avoid gcc warning } int @@ -232,6 +232,26 @@ forkOS_createThread ( HsStablePtr entry ) (unsigned*)&pId) == 0); } +nat +getNumberOfProcessors (void) +{ + static nat nproc = 0; + + if (nproc == 0) { + SYSTEM_INFO si; + GetSystemInfo(&si); + nproc = si.dwNumberOfProcessors; + } + + return nproc; +} + +void +setThreadAffinity (nat n STG_UNUSED, nat m STG_UNUSED) +{ + /* ToDo */ +} + #else /* !defined(THREADED_RTS) */ int