Zachary Turner | 39de311 | 2014-09-09 20:54:56 +0000 | [diff] [blame] | 1 | //===-- ThisThread.cpp ------------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "lldb/Host/HostNativeThread.h" |
| 11 | #include "lldb/Host/ThisThread.h" |
| 12 | |
| 13 | #include "llvm/ADT/SmallVector.h" |
| 14 | |
| 15 | #include <pthread.h> |
| 16 | |
| 17 | using namespace lldb_private; |
| 18 | |
| 19 | void |
| 20 | ThisThread::SetName(llvm::StringRef name) |
| 21 | { |
| 22 | HostNativeThread::SetName(::pthread_self(), name); |
| 23 | } |
| 24 | |
| 25 | void |
| 26 | ThisThread::GetName(llvm::SmallVectorImpl<char> &name) |
| 27 | { |
| 28 | HostNativeThread::GetName(::pthread_self(), name); |
| 29 | } |