mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
Replace pthread_setschedprio for osx, as it doesn't exist
This commit is contained in:
parent
d80343a28b
commit
f51ff1e051
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user