diff options
author | Jeff Garzik <jeff@garzik.org> | 2011-06-08 22:30:10 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2011-06-08 22:30:10 -0400 |
commit | 0091c4e128e216a88ed068c750e05d89fcbddc52 (patch) | |
tree | a50dfa37da73b96b8526663cb4ee78d37c464c38 | |
parent | 84ae273db91a11d776f4d253b89c5f0fcefce3a5 (diff) |
only read processor count via sysconf on non-Windows platforms
-rw-r--r-- | cpu-miner.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cpu-miner.c b/cpu-miner.c index 0d1a791..1d502b5 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -855,9 +855,12 @@ static void parse_arg (int key, char *arg) default: show_usage(); } + +#ifndef WIN32 num_processors = sysconf(_SC_NPROCESSORS_ONLN); if (!opt_n_threads) opt_n_threads = num_processors; +#endif /* !WIN32 */ } static void parse_config(void) |