This commit is contained in:
ilue 2018-06-12 11:10:03 +08:00 committed by GitHub
parent 3a1e8f0704
commit e22cd678b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,7 +228,7 @@ void zmq::thread_t::
return;
}
#endif
int rc = pthread_getschedparam (_descriptor, &policy, &param);
int rc = pthread_getschedparam (pthread_self (), &policy, &param);
posix_assert (rc);
if (_thread_sched_policy != ZMQ_THREAD_SCHED_POLICY_DFLT) {
@ -257,7 +257,7 @@ void zmq::thread_t::
param.sched_priority = -1;
#endif
rc = pthread_setschedparam (_descriptor, policy, &param);
rc = pthread_setschedparam (pthread_self (), policy, &param);
#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
// If this feature is unavailable at run-time, don't abort.