aboutsummaryrefslogtreecommitdiff
path: root/tests/performance_tests/performance_utils.h
diff options
context:
space:
mode:
authormydesktop <dev.mc2@gmail.com>2014-04-30 13:52:21 -0400
committermydesktop <dev.mc2@gmail.com>2014-04-30 13:52:21 -0400
commit67df296650a72b8769fac58787148080ec771805 (patch)
tree121b2de24f67b7591b9e8ebda3bc9aa0c84ffbff /tests/performance_tests/performance_utils.h
parentprompt to delete build directory on 'make clean' (diff)
downloadmonero-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.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;