Files
clang-p2996/lldb/source/Host/macosx/ThisThread.cpp
Jim Ingham 97c2868362 Make HostThread SetName work on OS X. GetName doesn't currently work, the code that was in
GetName actually got the queue name not the thread name and anyway didn't actually work to do
that.  So I just deleted it with a fixme.

<rdar://problem/24487554>

llvm-svn: 259818
2016-02-04 19:42:32 +00:00

30 lines
688 B
C++

//===-- ThisThread.cpp ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "lldb/Host/ThisThread.h"
#include <pthread.h>
#include "llvm/ADT/SmallVector.h"
using namespace lldb_private;
void
ThisThread::SetName(llvm::StringRef name)
{
#if defined (__APPLE__)
::pthread_setname_np(name.str().c_str());
#endif
}
void
ThisThread::GetName(llvm::SmallVectorImpl<char> &name)
{
// FIXME - implement this.
}