Merge pull request #18 from gh2k/osx-pthread-schedprio

Replace pthread_setschedprio for osx, as it doesn't exist
This commit is contained in:
Matt Feemster 2015-06-22 07:26:02 -07:00
commit c43dfb6786

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)
{
#endif
#ifdef WIN32
#if defined(WIN32)
SetThreadPriority(GetCurrentThread(), m_Priority);
#elif defined(__APPLE__)
sched_param sp = {0};
sp.sched_priority = m_Priority;
pthread_setschedparam(pthread_self(), SCHED_RR, &sp);
#else
pthread_setschedprio(pthread_self(), (int)m_Priority);
#endif