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!
This commit is contained in:
Luca Boccassi 2016-11-05 18:14:22 +00:00
parent 361e99a906
commit 43f3cc5c78

View File

@ -145,6 +145,12 @@ void zmq::thread_t::setSchedulingParameters(int priority_, int schedulingPolicy_
#endif
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);
#else