| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 295 } |
| 296 | 296 |
| 297 | 297 |
| 298 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) { | 298 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) { |
| 299 OSMemoryBarrier(); | 299 OSMemoryBarrier(); |
| 300 *ptr = value; | 300 *ptr = value; |
| 301 } | 301 } |
| 302 | 302 |
| 303 | 303 |
| 304 const char* OS::LocalTimezone(double time) { | 304 const char* OS::LocalTimezone(double time) { |
| 305 if (isnan(time)) return ""; | 305 if (std::isnan(time)) return ""; |
| 306 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 306 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
| 307 struct tm* t = localtime(&tv); | 307 struct tm* t = localtime(&tv); |
| 308 if (NULL == t) return ""; | 308 if (NULL == t) return ""; |
| 309 return t->tm_zone; | 309 return t->tm_zone; |
| 310 } | 310 } |
| 311 | 311 |
| 312 | 312 |
| 313 double OS::LocalTimeOffset() { | 313 double OS::LocalTimeOffset() { |
| 314 time_t tv = time(NULL); | 314 time_t tv = time(NULL); |
| 315 struct tm* t = localtime(&tv); | 315 struct tm* t = localtime(&tv); |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 limit_mutex = CreateMutex(); | 750 limit_mutex = CreateMutex(); |
| 751 } | 751 } |
| 752 | 752 |
| 753 | 753 |
| 754 void OS::TearDown() { | 754 void OS::TearDown() { |
| 755 delete limit_mutex; | 755 delete limit_mutex; |
| 756 } | 756 } |
| 757 | 757 |
| 758 | 758 |
| 759 } } // namespace v8::internal | 759 } } // namespace v8::internal |
| OLD | NEW |