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

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

Issue 326333002: Drop globals.h include from platform.h (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | « src/platform.h ('k') | src/platform-win32.cc » ('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 <pthread.h> 10 #include <pthread.h>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "src/base/atomicops.h" 49 #include "src/base/atomicops.h"
50 #endif 50 #endif
51 51
52 namespace v8 { 52 namespace v8 {
53 namespace internal { 53 namespace internal {
54 54
55 // 0 is never a valid thread id. 55 // 0 is never a valid thread id.
56 static const pthread_t kNoThread = (pthread_t) 0; 56 static const pthread_t kNoThread = (pthread_t) 0;
57 57
58 58
59 unsigned OS::CpuFeaturesImpliedByPlatform() {
60 return 0; // Nothing special.
61 }
62
63
64 int OS::NumberOfProcessorsOnline() { 59 int OS::NumberOfProcessorsOnline() {
65 return static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN)); 60 return static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
66 } 61 }
67 62
68 63
69 // Maximum size of the virtual memory. 0 means there is no artificial 64 // Maximum size of the virtual memory. 0 means there is no artificial
70 // limit. 65 // limit.
71 66
72 intptr_t OS::MaxVirtualMemory() { 67 intptr_t OS::MaxVirtualMemory() {
73 struct rlimit limit; 68 struct rlimit limit;
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 689
695 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { 690 void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
696 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); 691 pthread_key_t pthread_key = LocalKeyToPthreadKey(key);
697 int result = pthread_setspecific(pthread_key, value); 692 int result = pthread_setspecific(pthread_key, value);
698 ASSERT_EQ(0, result); 693 ASSERT_EQ(0, result);
699 USE(result); 694 USE(result);
700 } 695 }
701 696
702 697
703 } } // namespace v8::internal 698 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698