mirror of
https://github.com/zeromq/libzmq.git
synced 2025-07-03 01:05:23 +02:00
Problem: I can't refactor
Solution: fix ifdef check for pthread_setname
This commit is contained in:
parent
33246f7a9e
commit
092ad50b0c
@ -170,16 +170,16 @@ void zmq::thread_t::setThreadName(const char *name_)
|
|||||||
if (!name_)
|
if (!name_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if defined(HAVE_PTHREAD_SETNAME_1)
|
#if defined(ZMQ_HAVE_PTHREAD_SETNAME_1)
|
||||||
int rc = pthread_setname_np(name_);
|
int rc = pthread_setname_np(name_);
|
||||||
posix_assert (rc);
|
posix_assert (rc);
|
||||||
#elif defined(HAVE_PTHREAD_SETNAME_2)
|
#elif defined(ZMQ_HAVE_PTHREAD_SETNAME_2)
|
||||||
int rc = pthread_setname_np(descriptor, name_);
|
int rc = pthread_setname_np(descriptor, name_);
|
||||||
posix_assert (rc);
|
posix_assert (rc);
|
||||||
#elif defined(HAVE_PTHREAD_SETNAME_3)
|
#elif defined(ZMQ_HAVE_PTHREAD_SETNAME_3)
|
||||||
int rc = pthread_setname_np(descriptor, name_, NULL);
|
int rc = pthread_setname_np(descriptor, name_, NULL);
|
||||||
posix_assert (rc);
|
posix_assert (rc);
|
||||||
#elif defined(HAVE_PTHREAD_SET_NAME)
|
#elif defined(ZMQ_HAVE_PTHREAD_SET_NAME)
|
||||||
pthread_set_name_np(descriptor, name_);
|
pthread_set_name_np(descriptor, name_);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user