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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 | 119 |
120 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) { | 120 void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) { |
121 __asm__ __volatile__("" : : : "memory"); | 121 __asm__ __volatile__("" : : : "memory"); |
122 // An x86 store acts as a release barrier. | 122 // An x86 store acts as a release barrier. |
123 *ptr = value; | 123 *ptr = value; |
124 } | 124 } |
125 | 125 |
126 | 126 |
127 const char* OS::LocalTimezone(double time) { | 127 const char* OS::LocalTimezone(double time) { |
128 if (isnan(time)) return ""; | 128 if (std::isnan(time)) return ""; |
129 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); | 129 time_t tv = static_cast<time_t>(floor(time/msPerSecond)); |
130 struct tm* t = localtime(&tv); | 130 struct tm* t = localtime(&tv); |
131 if (NULL == t) return ""; | 131 if (NULL == t) return ""; |
132 return t->tm_zone; | 132 return t->tm_zone; |
133 } | 133 } |
134 | 134 |
135 | 135 |
136 double OS::LocalTimeOffset() { | 136 double OS::LocalTimeOffset() { |
137 time_t tv = time(NULL); | 137 time_t tv = time(NULL); |
138 struct tm* t = localtime(&tv); | 138 struct tm* t = localtime(&tv); |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 limit_mutex = CreateMutex(); | 735 limit_mutex = CreateMutex(); |
736 } | 736 } |
737 | 737 |
738 | 738 |
739 void OS::TearDown() { | 739 void OS::TearDown() { |
740 delete limit_mutex; | 740 delete limit_mutex; |
741 } | 741 } |
742 | 742 |
743 | 743 |
744 } } // namespace v8::internal | 744 } } // namespace v8::internal |
OLD | NEW |