| 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 MemoryBarrier(); | 315 MemoryBarrier(); |
| 316 #else | 316 #else |
| 317 __asm__ __volatile__("" : : : "memory"); | 317 __asm__ __volatile__("" : : : "memory"); |
| 318 // An x86 store acts as a release barrier. | 318 // An x86 store acts as a release barrier. |
| 319 #endif | 319 #endif |
| 320 *ptr = value; | 320 *ptr = value; |
| 321 } | 321 } |
| 322 | 322 |
| 323 | 323 |
| 324 const char* OS::LocalTimezone(double time) { | 324 const char* OS::LocalTimezone(double time) { |
| 325 if (isnan(time)) return ""; | 325 if (std::isnan(time)) return ""; |
| 326 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 326 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
| 327 struct tm* t = localtime(&tv); | 327 struct tm* t = localtime(&tv); |
| 328 if (NULL == t) return ""; | 328 if (NULL == t) return ""; |
| 329 return t->tm_zone; | 329 return t->tm_zone; |
| 330 } | 330 } |
| 331 | 331 |
| 332 | 332 |
| 333 double OS::LocalTimeOffset() { | 333 double OS::LocalTimeOffset() { |
| 334 time_t tv = time(NULL); | 334 time_t tv = time(NULL); |
| 335 struct tm* t = localtime(&tv); | 335 struct tm* t = localtime(&tv); |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 limit_mutex = CreateMutex(); | 996 limit_mutex = CreateMutex(); |
| 997 } | 997 } |
| 998 | 998 |
| 999 | 999 |
| 1000 void OS::TearDown() { | 1000 void OS::TearDown() { |
| 1001 delete limit_mutex; | 1001 delete limit_mutex; |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 | 1004 |
| 1005 } } // namespace v8::internal | 1005 } } // namespace v8::internal |
| OLD | NEW |