diff --git a/src/Cpu.h b/src/Cpu.h index 292c6c6c3..7f1f76141 100644 --- a/src/Cpu.h +++ b/src/Cpu.h @@ -25,6 +25,9 @@ #define __CPU_H__ +#include + + class Cpu { public: @@ -36,7 +39,7 @@ public: static int optimalThreadsCount(int algo, bool doubleHash, int maxCpuUsage); static void init(); - static void setAffinity(int id, unsigned long mask); + static void setAffinity(int id, uint64_t mask); static inline bool hasAES() { return m_flags & AES; } static inline bool isX64() { return m_flags & X86_64; } diff --git a/src/Cpu_unix.cpp b/src/Cpu_unix.cpp index 1b7c6b0a8..925e0c0a0 100644 --- a/src/Cpu_unix.cpp +++ b/src/Cpu_unix.cpp @@ -40,7 +40,7 @@ void Cpu::init() } -void Cpu::setAffinity(int id, unsigned long mask) +void Cpu::setAffinity(int id, uint64_t mask) { cpu_set_t set; CPU_ZERO(&set); diff --git a/src/Cpu_win.cpp b/src/Cpu_win.cpp index fe4ea0ba4..13113a178 100644 --- a/src/Cpu_win.cpp +++ b/src/Cpu_win.cpp @@ -41,7 +41,7 @@ void Cpu::init() } -void Cpu::setAffinity(int id, unsigned long mask) +void Cpu::setAffinity(int id, uint64_t mask) { if (id == -1) { SetProcessAffinityMask(GetCurrentProcess(), mask);