| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Returns the daylight savings offset for the given time. | 136 // Returns the daylight savings offset for the given time. |
| 137 static double DaylightSavingsOffset(double time, TimezoneCache* cache); | 137 static double DaylightSavingsOffset(double time, TimezoneCache* cache); |
| 138 | 138 |
| 139 // Returns last OS error. | 139 // Returns last OS error. |
| 140 static int GetLastError(); | 140 static int GetLastError(); |
| 141 | 141 |
| 142 static FILE* FOpen(const char* path, const char* mode); | 142 static FILE* FOpen(const char* path, const char* mode); |
| 143 static bool Remove(const char* path); | 143 static bool Remove(const char* path); |
| 144 | 144 |
| 145 static bool isDirectorySeparator(const char ch); |
| 146 |
| 145 // Opens a temporary file, the file is auto removed on close. | 147 // Opens a temporary file, the file is auto removed on close. |
| 146 static FILE* OpenTemporaryFile(); | 148 static FILE* OpenTemporaryFile(); |
| 147 | 149 |
| 148 // Log file open mode is platform-dependent due to line ends issues. | 150 // Log file open mode is platform-dependent due to line ends issues. |
| 149 static const char* const LogFileOpenMode; | 151 static const char* const LogFileOpenMode; |
| 150 | 152 |
| 151 // Print output to console. This is mostly used for debugging output. | 153 // Print output to console. This is mostly used for debugging output. |
| 152 // On platforms that has standard terminal output, the output | 154 // On platforms that has standard terminal output, the output |
| 153 // should go to stdout. | 155 // should go to stdout. |
| 154 static void Print(const char* format, ...); | 156 static void Print(const char* format, ...); |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 char name_[kMaxThreadNameLength]; | 468 char name_[kMaxThreadNameLength]; |
| 467 int stack_size_; | 469 int stack_size_; |
| 468 Semaphore* start_semaphore_; | 470 Semaphore* start_semaphore_; |
| 469 | 471 |
| 470 DISALLOW_COPY_AND_ASSIGN(Thread); | 472 DISALLOW_COPY_AND_ASSIGN(Thread); |
| 471 }; | 473 }; |
| 472 | 474 |
| 473 } } // namespace v8::base | 475 } } // namespace v8::base |
| 474 | 476 |
| 475 #endif // V8_BASE_PLATFORM_PLATFORM_H_ | 477 #endif // V8_BASE_PLATFORM_PLATFORM_H_ |
| OLD | NEW |