OLD | NEW |
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 // This module contains the platform-specific code. This make the rest of the | 5 // This module contains the platform-specific code. This make the rest of the |
6 // code less dependent on operating system, compilers and runtime libraries. | 6 // code less dependent on operating system, compilers and runtime libraries. |
7 // This module does specifically not deal with differences between different | 7 // This module does specifically not deal with differences between different |
8 // processor architecture. | 8 // processor architecture. |
9 // The platform classes have the same definition for all platforms. The | 9 // The platform classes have the same definition for all platforms. The |
10 // implementation for a particular platform is put in platform_<os>.cc. | 10 // implementation for a particular platform is put in platform_<os>.cc. |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 // Support runtime detection of whether the hard float option of the | 300 // Support runtime detection of whether the hard float option of the |
301 // EABI is used. | 301 // EABI is used. |
302 static bool ArmUsingHardFloat(); | 302 static bool ArmUsingHardFloat(); |
303 | 303 |
304 // Returns the activation frame alignment constraint or zero if | 304 // Returns the activation frame alignment constraint or zero if |
305 // the platform doesn't care. Guaranteed to be a power of two. | 305 // the platform doesn't care. Guaranteed to be a power of two. |
306 static int ActivationFrameAlignment(); | 306 static int ActivationFrameAlignment(); |
307 | 307 |
308 static int GetCurrentProcessId(); | 308 static int GetCurrentProcessId(); |
309 | 309 |
310 static int GetCurrentThreadId(); | |
311 | |
312 private: | 310 private: |
313 static const int msPerSecond = 1000; | 311 static const int msPerSecond = 1000; |
314 | 312 |
315 #if V8_OS_POSIX | 313 #if V8_OS_POSIX |
316 static const char* GetGCFakeMMapFile(); | 314 static const char* GetGCFakeMMapFile(); |
317 #endif | 315 #endif |
318 | 316 |
319 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); | 317 DISALLOW_IMPLICIT_CONSTRUCTORS(OS); |
320 }; | 318 }; |
321 | 319 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 char name_[kMaxThreadNameLength]; | 515 char name_[kMaxThreadNameLength]; |
518 int stack_size_; | 516 int stack_size_; |
519 Semaphore* start_semaphore_; | 517 Semaphore* start_semaphore_; |
520 | 518 |
521 DISALLOW_COPY_AND_ASSIGN(Thread); | 519 DISALLOW_COPY_AND_ASSIGN(Thread); |
522 }; | 520 }; |
523 | 521 |
524 } } // namespace v8::base | 522 } } // namespace v8::base |
525 | 523 |
526 #endif // V8_BASE_PLATFORM_PLATFORM_H_ | 524 #endif // V8_BASE_PLATFORM_PLATFORM_H_ |
OLD | NEW |