Skip to content

Commit 1ac7395

Browse files
committed
FreeBSD specific changes
1 parent 42dd489 commit 1ac7395

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

patch/platform_thread_remove_tracked_objects.patch

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,27 @@ index 95ed324..054de87 100644
4646

4747
#if !defined(OS_NACL)
4848
// On linux we can get the thread names to show up in the debugger by setting
49+
diff --git a/src/base/threading/platform_thread_freebsd.cc b/src/base/threading/platform_thread_freebsd.cc
50+
index 44f14c8..bddb6ac 100644
51+
--- a/src/base/threading/platform_thread_freebsd.cc
52+
+++ b/src/base/threading/platform_thread_freebsd.cc
53+
@@ -12,7 +12,9 @@
54+
#include "base/logging.h"
55+
#include "base/threading/platform_thread_internal_posix.h"
56+
#include "base/threading/thread_id_name_manager.h"
57+
+#if 0
58+
#include "base/tracked_objects.h"
59+
+#endif
60+
#include "build/build_config.h"
61+
62+
#if !defined(OS_NACL)
63+
@@ -67,7 +69,9 @@ bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) {
64+
// static
65+
void PlatformThread::SetName(const std::string& name) {
66+
ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
67+
+#if 0
68+
tracked_objects::ThreadData::InitializeThreadContext(name);
69+
+#endif
70+
71+
#if !defined(OS_NACL)
72+
// On FreeBSD we can get the thread names to show up in the debugger by

src/base/threading/platform_thread_freebsd.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
#include "base/logging.h"
1313
#include "base/threading/platform_thread_internal_posix.h"
1414
#include "base/threading/thread_id_name_manager.h"
15+
#if 0
1516
#include "base/tracked_objects.h"
17+
#endif
1618
#include "build/build_config.h"
1719

1820
#if !defined(OS_NACL)
@@ -67,7 +69,9 @@ bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) {
6769
// static
6870
void PlatformThread::SetName(const std::string& name) {
6971
ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
72+
#if 0
7073
tracked_objects::ThreadData::InitializeThreadContext(name);
74+
#endif
7175

7276
#if !defined(OS_NACL)
7377
// On FreeBSD we can get the thread names to show up in the debugger by

0 commit comments

Comments
 (0)