Revision: 15868
Author: [email protected]
Date: Thu Jul 25 01:00:32 2013
Log: Setting the thread name may fail, so don't assert that the result
is 0.
[email protected]
Review URL: https://codereview.chromium.org/20216003
http://code.google.com/p/v8/source/detail?r=15868
Modified:
/branches/bleeding_edge/src/platform-posix.cc
=======================================
--- /branches/bleeding_edge/src/platform-posix.cc Tue Jul 23 06:47:50 2013
+++ /branches/bleeding_edge/src/platform-posix.cc Thu Jul 25 01:00:32 2013
@@ -502,12 +502,11 @@
static void SetThreadName(const char* name) {
- int result = 0;
#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__)
- result = pthread_set_name_np(pthread_self(), name);
+ pthread_set_name_np(pthread_self(), name);
#elif defined(__NetBSD__)
STATIC_ASSERT(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP);
- result = pthread_setname_np(pthread_self(), "%s", name);
+ pthread_setname_np(pthread_self(), "%s", name);
#elif defined(__APPLE__)
// pthread_setname_np is only available in 10.6 or later, so test
// for it at runtime.
@@ -520,14 +519,12 @@
// Mac OS X does not expose the length limit of the name, so hardcode it.
static const int kMaxNameLength = 63;
STATIC_ASSERT(Thread::kMaxThreadNameLength <= kMaxNameLength);
- result = dynamic_pthread_setname_np(name);
+ dynamic_pthread_setname_np(name);
#elif defined(PR_SET_NAME)
- result = prctl(PR_SET_NAME,
- reinterpret_cast<unsigned long>(name), // NOLINT
- 0, 0, 0);
+ prctl(PR_SET_NAME,
+ reinterpret_cast<unsigned long>(name), // NOLINT
+ 0, 0, 0);
#endif
- ASSERT_EQ(0, result);
- USE(result);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.