| Index: base/threading/platform_thread_posix.cc
|
| diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
|
| index 444edc58a6268649115f2f1583bc7b56374d961d..a066278bdb83ad9ebb7600da339eb14eebaaab6c 100644
|
| --- a/base/threading/platform_thread_posix.cc
|
| +++ b/base/threading/platform_thread_posix.cc
|
| @@ -11,6 +11,7 @@
|
| #include "base/logging.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/safe_strerror_posix.h"
|
| +#include "base/threading/thread_id_name_manager.h"
|
| #include "base/threading/thread_local.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "base/tracked_objects.h"
|
| @@ -200,6 +201,8 @@ void PlatformThread::SetName(const char* name) {
|
| current_thread_name.Pointer()->Set(const_cast<char*>(name));
|
| tracked_objects::ThreadData::InitializeThreadContext(name);
|
|
|
| + ThreadIdNameManager::GetInstance()->SetNameForId(CurrentId(), name);
|
| +
|
| // On linux we can get the thread names to show up in the debugger by setting
|
| // the process name for the LWP. We don't want to do this for the main
|
| // thread because that would rename the process, causing tools like killall
|
| @@ -227,6 +230,8 @@ void PlatformThread::SetName(const char* name) {
|
| current_thread_name.Pointer()->Set(const_cast<char*>(name));
|
| tracked_objects::ThreadData::InitializeThreadContext(name);
|
|
|
| + ThreadIdNameManager::GetInstance()->SetNameForId(CurrentId(), name);
|
| +
|
| // (This should be relatively simple to implement for the BSDs; I
|
| // just don't have one handy to test the code on.)
|
| }
|
|
|