diff options
| author | Ed Maste <emaste@freebsd.org> | 2014-09-10 17:09:46 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@freebsd.org> | 2014-09-10 17:09:46 +0000 |
| commit | 3b7382da744446186ccf029ac2e8751d174281da (patch) | |
| tree | ff9d0e00d3e81bc855d2e01965252a80669fb26a | |
| parent | 0def0668e48945892834c4dbaa690edf9046cf90 (diff) | |
| download | bcm5719-llvm-3b7382da744446186ccf029ac2e8751d174281da.tar.gz bcm5719-llvm-3b7382da744446186ccf029ac2e8751d174281da.zip | |
Move FreeBSD's thread SetName implementation to ThisThread
SetName is only used in LLDB to set a thead's own name. Move it there
to match OS X and Windows and slightly reduce the effort in any future
HostThread/ThisThread name refactoring.
llvm-svn: 217521
| -rw-r--r-- | lldb/include/lldb/Host/freebsd/HostThreadFreeBSD.h | 1 | ||||
| -rw-r--r-- | lldb/source/Host/freebsd/HostThreadFreeBSD.cpp | 6 | ||||
| -rw-r--r-- | lldb/source/Host/freebsd/ThisThread.cpp | 2 |
3 files changed, 1 insertions, 8 deletions
diff --git a/lldb/include/lldb/Host/freebsd/HostThreadFreeBSD.h b/lldb/include/lldb/Host/freebsd/HostThreadFreeBSD.h index 51a72419c3e..056957607af 100644 --- a/lldb/include/lldb/Host/freebsd/HostThreadFreeBSD.h +++ b/lldb/include/lldb/Host/freebsd/HostThreadFreeBSD.h @@ -24,7 +24,6 @@ class HostThreadFreeBSD : public HostThreadPosix HostThreadFreeBSD(); HostThreadFreeBSD(lldb::thread_t thread); - static void SetName(lldb::thread_t thread, llvm::StringRef name); static void GetName(lldb::tid_t tid, llvm::SmallVectorImpl<char> &name); }; } diff --git a/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp b/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp index 4f3fd312cc9..7d611bb6894 100644 --- a/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp +++ b/lldb/source/Host/freebsd/HostThreadFreeBSD.cpp @@ -34,12 +34,6 @@ HostThreadFreeBSD::HostThreadFreeBSD(lldb::thread_t thread) } void -HostThreadFreeBSD::SetName(lldb::thread_t thread, llvm::StringRef name) -{ - ::pthread_set_name_np(thread, name.data()); -} - -void HostThreadFreeBSD::GetName(lldb::tid_t tid, llvm::SmallVectorImpl<char> &name) { name.clear(); diff --git a/lldb/source/Host/freebsd/ThisThread.cpp b/lldb/source/Host/freebsd/ThisThread.cpp index a9f805885e8..fb25847be24 100644 --- a/lldb/source/Host/freebsd/ThisThread.cpp +++ b/lldb/source/Host/freebsd/ThisThread.cpp @@ -20,7 +20,7 @@ using namespace lldb_private; void ThisThread::SetName(llvm::StringRef name) { - HostNativeThread::SetName(::pthread_self(), name); + ::pthread_set_name_np(::pthread_self(), name.data()); } void |

