Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: src/platform-win32.cc

Issue 12089107: Determine number of available cores on all platforms. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/platform-solaris.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 DWORD oldprotect; 961 DWORD oldprotect;
962 VirtualProtect(address, size, PAGE_READONLY | PAGE_GUARD, &oldprotect); 962 VirtualProtect(address, size, PAGE_READONLY | PAGE_GUARD, &oldprotect);
963 } 963 }
964 964
965 965
966 void OS::Sleep(int milliseconds) { 966 void OS::Sleep(int milliseconds) {
967 ::Sleep(milliseconds); 967 ::Sleep(milliseconds);
968 } 968 }
969 969
970 970
971 int OS::NumberOfCores() {
972 SYSTEM_INFO info;
973 GetSystemInfo(&info);
974 return info.dwNumberOfProcessors;
975 }
976
977
971 void OS::Abort() { 978 void OS::Abort() {
972 if (IsDebuggerPresent() || FLAG_break_on_abort) { 979 if (IsDebuggerPresent() || FLAG_break_on_abort) {
973 DebugBreak(); 980 DebugBreak();
974 } else { 981 } else {
975 // Make the MSVCRT do a silent abort. 982 // Make the MSVCRT do a silent abort.
976 raise(SIGABRT); 983 raise(SIGABRT);
977 } 984 }
978 } 985 }
979 986
980 987
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 2132
2126 2133
2127 void Sampler::Stop() { 2134 void Sampler::Stop() {
2128 ASSERT(IsActive()); 2135 ASSERT(IsActive());
2129 SamplerThread::RemoveActiveSampler(this); 2136 SamplerThread::RemoveActiveSampler(this);
2130 SetActive(false); 2137 SetActive(false);
2131 } 2138 }
2132 2139
2133 2140
2134 } } // namespace v8::internal 2141 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-solaris.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698