Replace pthread_setschedprio for osx, as it doesn't exist

This commit is contained in:
Simon Detheridge 2015-06-22 15:03:15 +01:00
parent d80343a28b
commit f51ff1e051

View File

@ -1215,8 +1215,12 @@ EmberStats Renderer<T, bucketT>::Iterate(size_t iterCount, size_t temporalSample
parallel_for(size_t(0), m_ThreadsToUse, [&] (size_t threadIndex) parallel_for(size_t(0), m_ThreadsToUse, [&] (size_t threadIndex)
{ {
#endif #endif
#ifdef WIN32 #if defined(WIN32)
SetThreadPriority(GetCurrentThread(), m_Priority); SetThreadPriority(GetCurrentThread(), m_Priority);
#elif defined(__APPLE__)
sched_param sp = {0};
sp.sched_priority = m_Priority;
pthread_setschedparam(pthread_self(), SCHED_RR, &sp);
#else #else
pthread_setschedprio(pthread_self(), (int)m_Priority); pthread_setschedprio(pthread_self(), (int)m_Priority);
#endif #endif