From: Willem Jan Withagen Date: Tue, 7 Mar 2017 09:18:52 +0000 (+0100) Subject: msg/async/Stack.cc: use of pthread_setname_np() needs compat.h X-Git-Tag: v12.0.1~94^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13825%2Fhead;p=ceph.git msg/async/Stack.cc: use of pthread_setname_np() needs compat.h - use Ceph abstraction for pthread_setname_np - Because there is a name decrepancy between FreeBSD and Linux Which is repaired in compat.h Signed-off-by: Willem Jan Withagen --- diff --git a/src/msg/async/Stack.cc b/src/msg/async/Stack.cc index f3e61e0db794..f4f4dee06142 100644 --- a/src/msg/async/Stack.cc +++ b/src/msg/async/Stack.cc @@ -14,6 +14,7 @@ * */ +#include "include/compat.h" #include "common/Cond.h" #include "common/errno.h" #include "PosixStack.h" @@ -37,7 +38,7 @@ std::function NetworkStack::add_thread(unsigned i) return [this, w]() { char tp_name[16]; sprintf(tp_name, "msgr-worker-%d", w->id); - pthread_setname_np(pthread_self(), tp_name); + ceph_pthread_setname(pthread_self(), tp_name); const uint64_t EventMaxWaitUs = 30000000; w->center.set_owner(); ldout(cct, 10) << __func__ << " starting" << dendl;