Commit 43f3cc5c authored by Luca Boccassi's avatar Luca Boccassi

Problem: kFreeBSD does not implement pthread_setschedparam

Solution: do not fail on kFreeBSD if this feature is not available
at runtime.
Thanks Steven Chamberlain <steven@pyro.eu.org> for the patch!
parent 361e99a9
...@@ -145,6 +145,12 @@ void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_ ...@@ -145,6 +145,12 @@ void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_
#endif #endif
rc = pthread_setschedparam(descriptor, policy, &param); rc = pthread_setschedparam(descriptor, policy, &param);
#ifdef __FreeBSD_kernel__
// If this feature is unavailable at run-time, don't abort.
if(rc == ENOSYS) return;
#endif
posix_assert (rc); posix_assert (rc);
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment