diff options
Diffstat (limited to 'llvm/lib/Support/Unix/Threading.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Threading.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Threading.inc b/llvm/lib/Support/Unix/Threading.inc index 742660d..562971a 100644 --- a/llvm/lib/Support/Unix/Threading.inc +++ b/llvm/lib/Support/Unix/Threading.inc @@ -318,6 +318,7 @@ static int computeHostNumHardwareThreads() { return CPU_COUNT(&mask); #elif defined(__linux__) cpu_set_t Set; + CPU_ZERO(&Set); if (sched_getaffinity(0, sizeof(Set), &Set) == 0) return CPU_COUNT(&Set); #endif |