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 Win32. | 5 // Platform-specific code for Win32. |
6 | 6 |
7 // Secure API functions are not available using MinGW with msvcrt.dll | 7 // Secure API functions are not available using MinGW with msvcrt.dll |
8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to | 8 // on Windows XP. Make sure MINGW_HAS_SECURE_API is not defined to |
9 // disable definition of secure API functions in standard headers that | 9 // disable definition of secure API functions in standard headers that |
10 // would conflict with our own implementation. | 10 // would conflict with our own implementation. |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 void OS::LogSharedLibraryAddresses(Isolate* isolate) { } | 1189 void OS::LogSharedLibraryAddresses(Isolate* isolate) { } |
1190 void OS::SignalCodeMovingGC() { } | 1190 void OS::SignalCodeMovingGC() { } |
1191 #endif // __MINGW32__ | 1191 #endif // __MINGW32__ |
1192 | 1192 |
1193 | 1193 |
1194 unsigned OS::CpuFeaturesImpliedByPlatform() { | 1194 unsigned OS::CpuFeaturesImpliedByPlatform() { |
1195 return 0; // Windows runs on anything. | 1195 return 0; // Windows runs on anything. |
1196 } | 1196 } |
1197 | 1197 |
1198 | 1198 |
| 1199 int OS::NumberOfProcessorsOnline() { |
| 1200 SYSTEM_INFO info; |
| 1201 GetSystemInfo(&info); |
| 1202 return info.dwNumberOfProcessors; |
| 1203 } |
| 1204 |
| 1205 |
1199 double OS::nan_value() { | 1206 double OS::nan_value() { |
1200 #ifdef _MSC_VER | 1207 #ifdef _MSC_VER |
1201 // Positive Quiet NaN with no payload (aka. Indeterminate) has all bits | 1208 // Positive Quiet NaN with no payload (aka. Indeterminate) has all bits |
1202 // in mask set, so value equals mask. | 1209 // in mask set, so value equals mask. |
1203 static const __int64 nanval = kQuietNaNMask; | 1210 static const __int64 nanval = kQuietNaNMask; |
1204 return *reinterpret_cast<const double*>(&nanval); | 1211 return *reinterpret_cast<const double*>(&nanval); |
1205 #else // _MSC_VER | 1212 #else // _MSC_VER |
1206 return NAN; | 1213 return NAN; |
1207 #endif // _MSC_VER | 1214 #endif // _MSC_VER |
1208 } | 1215 } |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1422 ASSERT(result); | 1429 ASSERT(result); |
1423 } | 1430 } |
1424 | 1431 |
1425 | 1432 |
1426 | 1433 |
1427 void Thread::YieldCPU() { | 1434 void Thread::YieldCPU() { |
1428 Sleep(0); | 1435 Sleep(0); |
1429 } | 1436 } |
1430 | 1437 |
1431 } } // namespace v8::internal | 1438 } } // namespace v8::internal |
OLD | NEW |