| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // OS | 144 // OS |
| 145 // | 145 // |
| 146 // This class has static methods for the different platform specific | 146 // This class has static methods for the different platform specific |
| 147 // functions. Add methods here to cope with differences between the | 147 // functions. Add methods here to cope with differences between the |
| 148 // supported platforms. | 148 // supported platforms. |
| 149 | 149 |
| 150 class OS { | 150 class OS { |
| 151 public: | 151 public: |
| 152 // Initializes the platform OS support that depend on CPU features. This is | 152 // Initializes the platform OS support that depend on CPU features. This is |
| 153 // called after CPU initialization. | 153 // called after CPU initialization. |
| 154 static void PostSetUp(); | 154 static void PostSetUp(bool serializer_enabled); |
| 155 | 155 |
| 156 // Returns the accumulated user time for thread. This routine | 156 // Returns the accumulated user time for thread. This routine |
| 157 // can be used for profiling. The implementation should | 157 // can be used for profiling. The implementation should |
| 158 // strive for high-precision timer resolution, preferable | 158 // strive for high-precision timer resolution, preferable |
| 159 // micro-second resolution. | 159 // micro-second resolution. |
| 160 static int GetUserTime(uint32_t* secs, uint32_t* usecs); | 160 static int GetUserTime(uint32_t* secs, uint32_t* usecs); |
| 161 | 161 |
| 162 // Returns current time as the number of milliseconds since | 162 // Returns current time as the number of milliseconds since |
| 163 // 00:00:00 UTC, January 1, 1970. | 163 // 00:00:00 UTC, January 1, 1970. |
| 164 static double TimeCurrentMillis(); | 164 static double TimeCurrentMillis(); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 char name_[kMaxThreadNameLength]; | 595 char name_[kMaxThreadNameLength]; |
| 596 int stack_size_; | 596 int stack_size_; |
| 597 Semaphore* start_semaphore_; | 597 Semaphore* start_semaphore_; |
| 598 | 598 |
| 599 DISALLOW_COPY_AND_ASSIGN(Thread); | 599 DISALLOW_COPY_AND_ASSIGN(Thread); |
| 600 }; | 600 }; |
| 601 | 601 |
| 602 } } // namespace v8::internal | 602 } } // namespace v8::internal |
| 603 | 603 |
| 604 #endif // V8_PLATFORM_H_ | 604 #endif // V8_PLATFORM_H_ |
| OLD | NEW |