X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fwin32%2FOSThreads.c;h=410346916bddde9122bbd95a906fac5cdb602ce7;hb=f84a0b7028424ea167658c06e75e871198371f00;hp=13a3666b63c1767b5c158301e3da628befdaf678;hpb=0ee85183fac8129a3c1b890849f32f30fd3940ec;p=ghc-hetmet.git diff --git a/rts/win32/OSThreads.c b/rts/win32/OSThreads.c index 13a3666..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,12 +232,24 @@ forkOS_createThread ( HsStablePtr entry ) (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) */