]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/Stack.cc: use of pthread_setname_np() needs compat.h 13825/head
authorWillem Jan Withagen <wjw@digiware.nl>
Tue, 7 Mar 2017 09:18:52 +0000 (10:18 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 7 Mar 2017 11:29:28 +0000 (12:29 +0100)
 - 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 <wjw@digiware.nl>
src/msg/async/Stack.cc

index f3e61e0db794fd516802709892e4c02142472fee..f4f4dee061422dee5948e74f09c94651ff586884 100644 (file)
@@ -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<void ()> 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;