| 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 // Platform-specific code for OpenBSD and NetBSD goes here. For the | 5 // Platform-specific code for OpenBSD and NetBSD goes here. For the |
| 6 // POSIX-compatible parts, the implementation is in platform-posix.cc. | 6 // POSIX-compatible parts, the implementation is in platform-posix.cc. |
| 7 | 7 |
| 8 #include <pthread.h> | 8 #include <pthread.h> |
| 9 #include <semaphore.h> | 9 #include <semaphore.h> |
| 10 #include <signal.h> | 10 #include <signal.h> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include <unistd.h> // sysconf | 21 #include <unistd.h> // sysconf |
| 22 #include <strings.h> // index | 22 #include <strings.h> // index |
| 23 #include <errno.h> | 23 #include <errno.h> |
| 24 #include <stdarg.h> | 24 #include <stdarg.h> |
| 25 | 25 |
| 26 #undef MAP_TYPE | 26 #undef MAP_TYPE |
| 27 | 27 |
| 28 #include "src/v8.h" | 28 #include "src/v8.h" |
| 29 | 29 |
| 30 #include "src/platform.h" | 30 #include "src/platform.h" |
| 31 #include "src/v8threads.h" | |
| 32 | 31 |
| 33 | 32 |
| 34 namespace v8 { | 33 namespace v8 { |
| 35 namespace internal { | 34 namespace internal { |
| 36 | 35 |
| 37 | 36 |
| 38 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { | 37 const char* OS::LocalTimezone(double time, TimezoneCache* cache) { |
| 39 if (std::isnan(time)) return ""; | 38 if (std::isnan(time)) return ""; |
| 40 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); | 39 time_t tv = static_cast<time_t>(std::floor(time/msPerSecond)); |
| 41 struct tm* t = localtime(&tv); | 40 struct tm* t = localtime(&tv); |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 return munmap(base, size) == 0; | 330 return munmap(base, size) == 0; |
| 332 } | 331 } |
| 333 | 332 |
| 334 | 333 |
| 335 bool VirtualMemory::HasLazyCommits() { | 334 bool VirtualMemory::HasLazyCommits() { |
| 336 // TODO(alph): implement for the platform. | 335 // TODO(alph): implement for the platform. |
| 337 return false; | 336 return false; |
| 338 } | 337 } |
| 339 | 338 |
| 340 } } // namespace v8::internal | 339 } } // namespace v8::internal |
| OLD | NEW |