diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-03-17 09:33:09 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-03-17 09:33:09 +0000 |
commit | 0ee0be109fd00ec629f7a2ad6a597885a0c9d5b4 (patch) | |
tree | f34e7ebeb8ff40299745b169c4ca4b7bed4b2c54 /rts/RtsFlags.c | |
parent | 8844513929ccd58854227ddb6275095a1f1742ad (diff) | |
download | haskell-0ee0be109fd00ec629f7a2ad6a597885a0c9d5b4.tar.gz |
Add getNumberOfProcessors(), FIX MacOS X build problem (hopefully)
Somebody needs to implement getNumberOfProcessors() for MacOS X,
currently it will return 1.
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r-- | rts/RtsFlags.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index 2af67e7dc2..b3b95b32d9 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -1152,17 +1152,7 @@ error = rtsTrue; #if defined(PROFILING) RtsFlags.ParFlags.nNodes = 1; #else -#if defined(mingw32_HOST_OS) - { - SYSTEM_INFO si; - GetSystemInfo(&si); - RtsFlags.ParFlags.nNodes = si.dwNumberOfProcessors; - } -#elif defined(HAVE_SYSCONF) - RtsFlags.ParFlags.nNodes = sysconf(_SC_NPROCESSORS_CONF); -#else - RtsFlags.ParFlags.nNodes = 1; -#endif + RtsFlags.ParFlags.nNodes = getNumberOfProcessors(); #endif } else { RtsFlags.ParFlags.nNodes |