summaryrefslogtreecommitdiffstats
path: root/base/platform_thread_mac.mm
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 23:39:06 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-08 23:39:06 +0000
commit1b9c01fef349b0721f65248ae9f762e47218af95 (patch)
treec04c91860c5dc032c1978246bace851a18d1a40d /base/platform_thread_mac.mm
parentbe595106fde488c301f33742df0a61100b2cce75 (diff)
downloadchromium_src-1b9c01fef349b0721f65248ae9f762e47218af95.zip
chromium_src-1b9c01fef349b0721f65248ae9f762e47218af95.tar.gz
chromium_src-1b9c01fef349b0721f65248ae9f762e47218af95.tar.bz2
Revert "posix: set thread names"
This reverts commit r49212. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_thread_mac.mm')
-rw-r--r--base/platform_thread_mac.mm21
1 files changed, 0 insertions, 21 deletions
diff --git a/base/platform_thread_mac.mm b/base/platform_thread_mac.mm
index 62139a9..46ac241 100644
--- a/base/platform_thread_mac.mm
+++ b/base/platform_thread_mac.mm
@@ -5,10 +5,8 @@
#include "base/platform_thread.h"
#import <Foundation/Foundation.h>
-#include <dlfcn.h>
#include "base/logging.h"
-#include "base/safe_strerror_posix.h"
// A simple class that demonstrates our impressive ability to do nothing.
@interface NoOp : NSObject
@@ -47,23 +45,4 @@ void InitThreading() {
}
}
-// static
-void PlatformThread::SetName(const char* name) {
- // pthread_setname_np is only available in 10.6 or later, so test
- // for it at runtime.
- int (*dynamic_pthread_setname_np)(const char*);
- *reinterpret_cast<void**>(&dynamic_pthread_setname_np) =
- dlsym(RTLD_DEFAULT, "pthread_setname_np");
- if (!dynamic_pthread_setname_np)
- return;
-
- // Mac OS X does not expose the length limit of the name, so
- // hardcode it.
- const int kMaxNameLength = 63;
- std::string shortened_name = std::string(name).substr(0, kMaxNameLength);
- int err = dynamic_pthread_setname_np(shortened_name.c_str());
- if (err < 0)
- LOG(ERROR) << "pthread_setname_np: " << safe_strerror(err);
-}
-
} // namespace base