Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/base/platform/platform-posix.cc

Issue 440663002: Enable C++11. Synch toolchains with Chrome. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Disabled test on VisualStudio for now. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/standalone.gypi ('k') | src/json-parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Platform-specific code for POSIX goes here. This is not a platform on its 5 // Platform-specific code for POSIX goes here. This is not a platform on its
6 // own, but contains the parts which are the same across the POSIX platforms 6 // own, but contains the parts which are the same across the POSIX platforms
7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. 7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX.
8 8
9 #include <dlfcn.h> 9 #include <dlfcn.h>
10 #include <errno.h> 10 #include <errno.h>
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 PlatformData() : thread_(kNoThread) {} 508 PlatformData() : thread_(kNoThread) {}
509 pthread_t thread_; // Thread handle for pthread. 509 pthread_t thread_; // Thread handle for pthread.
510 // Synchronizes thread creation 510 // Synchronizes thread creation
511 Mutex thread_creation_mutex_; 511 Mutex thread_creation_mutex_;
512 }; 512 };
513 513
514 Thread::Thread(const Options& options) 514 Thread::Thread(const Options& options)
515 : data_(new PlatformData), 515 : data_(new PlatformData),
516 stack_size_(options.stack_size()), 516 stack_size_(options.stack_size()),
517 start_semaphore_(NULL) { 517 start_semaphore_(NULL) {
518 if (stack_size_ > 0 && stack_size_ < PTHREAD_STACK_MIN) { 518 if (stack_size_ > 0 && static_cast<size_t>(stack_size_) < PTHREAD_STACK_MIN) {
519 stack_size_ = PTHREAD_STACK_MIN; 519 stack_size_ = PTHREAD_STACK_MIN;
520 } 520 }
521 set_name(options.name()); 521 set_name(options.name());
522 } 522 }
523 523
524 524
525 Thread::~Thread() { 525 Thread::~Thread() {
526 delete data_; 526 delete data_;
527 } 527 }
528 528
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 728
729 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 729 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
730 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); 730 pthread_key_t pthread_key = LocalKeyToPthreadKey(key);
731 int result = pthread_setspecific(pthread_key, value); 731 int result = pthread_setspecific(pthread_key, value);
732 DCHECK_EQ(0, result); 732 DCHECK_EQ(0, result);
733 USE(result); 733 USE(result);
734 } 734 }
735 735
736 736
737 } } // namespace v8::base 737 } } // namespace v8::base
OLDNEW
« no previous file with comments | « build/standalone.gypi ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698