From e49de5c5995752fdaa2c81c89ea9c72b75a56118 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Tue, 7 Mar 2017 10:18:52 +0100 Subject: [PATCH] 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 --- src/msg/async/Stack.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.47.3