diff options
author | mydesktop <dev.mc2@gmail.com> | 2014-04-30 13:52:21 -0400 |
---|---|---|
committer | mydesktop <dev.mc2@gmail.com> | 2014-04-30 13:52:21 -0400 |
commit | 67df296650a72b8769fac58787148080ec771805 (patch) | |
tree | 121b2de24f67b7591b9e8ebda3bc9aa0c84ffbff /tests/performance_tests/performance_utils.h | |
parent | prompt to delete build directory on 'make clean' (diff) | |
download | monero-67df296650a72b8769fac58787148080ec771805.tar.xz |
various fixes to allow mac osx compilation
Diffstat (limited to 'tests/performance_tests/performance_utils.h')
-rw-r--r-- | tests/performance_tests/performance_utils.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/performance_tests/performance_utils.h b/tests/performance_tests/performance_utils.h index b2ac4076f..45ca5b27b 100644 --- a/tests/performance_tests/performance_utils.h +++ b/tests/performance_tests/performance_utils.h @@ -14,7 +14,9 @@ void set_process_affinity(int core) { -#if defined(BOOST_WINDOWS) +#if defined (__APPLE__) + return; +#elif defined(BOOST_WINDOWS) DWORD_PTR mask = 1; for (int i = 0; i < core; ++i) { @@ -34,7 +36,9 @@ void set_process_affinity(int core) void set_thread_high_priority() { -#if defined(BOOST_WINDOWS) +#if defined(__APPLE__) + return; +#elif defined(BOOST_WINDOWS) ::SetPriorityClass(::GetCurrentProcess(), HIGH_PRIORITY_CLASS); #elif defined(BOOST_HAS_PTHREADS) pthread_attr_t attr; |