aboutsummaryrefslogtreecommitdiff
path: root/tests/performance_tests/performance_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/performance_tests/performance_utils.h')
-rw-r--r--tests/performance_tests/performance_utils.h8
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;