Fix compilation on Linux 2.6.9 and older.

Review URL: http://codereview.chromium.org/7655016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8948 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
erik.corry@gmail.com 2011-08-17 08:24:36 +00:00
parent 7f36b52540
commit 1e2d65780e

View File

@ -676,9 +676,11 @@ static void* ThreadEntry(void* arg) {
// This is also initialized by the first argument to pthread_create() but we // This is also initialized by the first argument to pthread_create() but we
// don't know which thread will run first (the original thread or the new // don't know which thread will run first (the original thread or the new
// one) so we initialize it here too. // one) so we initialize it here too.
#ifdef PR_SET_NAME
prctl(PR_SET_NAME, prctl(PR_SET_NAME,
reinterpret_cast<unsigned long>(thread->name()), // NOLINT reinterpret_cast<unsigned long>(thread->name()), // NOLINT
0, 0, 0); 0, 0, 0);
#endif
thread->data()->thread_ = pthread_self(); thread->data()->thread_ = pthread_self();
ASSERT(thread->data()->thread_ != kNoThread); ASSERT(thread->data()->thread_ != kNoThread);
thread->Run(); thread->Run();