0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-29 00:32:34 +08:00

pthread_equal to compare thread ids

I am trying to port ZeroMQ to z/OS USS and I faced several problems. One of them is this function "is_current_thread" trying to compare two thread ids with operator "==". I've changed the code to use the official function "pthread_equal" to compare thread ids and now it's working fine.
This commit is contained in:
Philippe Bernardino Leite 2019-06-10 22:10:01 -03:00 committed by GitHub
parent 2202587267
commit 8a02f70706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -248,7 +248,7 @@ void zmq::thread_t::stop ()
bool zmq::thread_t::is_current_thread () const bool zmq::thread_t::is_current_thread () const
{ {
return pthread_self () == _descriptor; return bool( pthread_equal(pthread_self (), _descriptor) );
} }
void zmq::thread_t::setSchedulingParameters ( void zmq::thread_t::setSchedulingParameters (