[Lldb-commits] [PATCH] D30844: pthread_setname_np first appeared in glibc 2.12

Jonathan Roelofs via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 13 08:26:40 PDT 2017


jroelofs updated this revision to Diff 91566.
jroelofs added a comment.

It builds, so the code was dead anyway. Didn't re-run the tests.


https://reviews.llvm.org/D30844

Files:
  include/lldb/Host/linux/HostThreadLinux.h
  source/Host/linux/HostThreadLinux.cpp


Index: source/Host/linux/HostThreadLinux.cpp
===================================================================
--- source/Host/linux/HostThreadLinux.cpp
+++ source/Host/linux/HostThreadLinux.cpp
@@ -13,8 +13,6 @@
 
 #include "llvm/ADT/SmallVector.h"
 
-#include <pthread.h>
-
 using namespace lldb_private;
 
 HostThreadLinux::HostThreadLinux() : HostThreadPosix() {}
@@ -22,15 +20,6 @@
 HostThreadLinux::HostThreadLinux(lldb::thread_t thread)
     : HostThreadPosix(thread) {}
 
-void HostThreadLinux::SetName(lldb::thread_t thread, llvm::StringRef name) {
-#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
-  ::pthread_setname_np(thread, name.data());
-#else
-  (void)thread;
-  (void)name;
-#endif
-}
-
 void HostThreadLinux::GetName(lldb::thread_t thread,
                               llvm::SmallVectorImpl<char> &name) {
   // Read /proc/$TID/comm file.
Index: include/lldb/Host/linux/HostThreadLinux.h
===================================================================
--- include/lldb/Host/linux/HostThreadLinux.h
+++ include/lldb/Host/linux/HostThreadLinux.h
@@ -22,7 +22,6 @@
   HostThreadLinux();
   HostThreadLinux(lldb::thread_t thread);
 
-  static void SetName(lldb::thread_t thread, llvm::StringRef name);
   static void GetName(lldb::thread_t thread, llvm::SmallVectorImpl<char> &name);
 };
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30844.91566.patch
Type: text/x-patch
Size: 1339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170313/72a50c5c/attachment.bin>


More information about the lldb-commits mailing list