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

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

Issue 337093005: Revert 22098 "Linux perf tool support update + refactoring." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/base/platform/platform-posix.cc ('k') | src/flag-definitions.h » ('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 // 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 int OS::GetLastError() { 510 int OS::GetLastError() {
511 return ::GetLastError(); 511 return ::GetLastError();
512 } 512 }
513 513
514 514
515 int OS::GetCurrentProcessId() { 515 int OS::GetCurrentProcessId() {
516 return static_cast<int>(::GetCurrentProcessId()); 516 return static_cast<int>(::GetCurrentProcessId());
517 } 517 }
518 518
519 519
520 int OS::GetCurrentThreadId() {
521 return static_cast<int>(::GetCurrentThreadId());
522 }
523
524
525 // ---------------------------------------------------------------------------- 520 // ----------------------------------------------------------------------------
526 // Win32 console output. 521 // Win32 console output.
527 // 522 //
528 // If a Win32 application is linked as a console application it has a normal 523 // If a Win32 application is linked as a console application it has a normal
529 // standard output and standard error. In this case normal printf works fine 524 // standard output and standard error. In this case normal printf works fine
530 // for output. However, if the application is linked as a GUI application, 525 // for output. However, if the application is linked as a GUI application,
531 // the process doesn't have a console, and therefore (debugging) output is lost. 526 // the process doesn't have a console, and therefore (debugging) output is lost.
532 // This is the case if we are embedded in a windows program (like a browser). 527 // This is the case if we are embedded in a windows program (like a browser).
533 // In order to be able to get debug output in this case the the debugging 528 // In order to be able to get debug output in this case the the debugging
534 // facility using OutputDebugString. This output goes to the active debugger 529 // facility using OutputDebugString. This output goes to the active debugger
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 ASSERT(result); 1415 ASSERT(result);
1421 } 1416 }
1422 1417
1423 1418
1424 1419
1425 void Thread::YieldCPU() { 1420 void Thread::YieldCPU() {
1426 Sleep(0); 1421 Sleep(0);
1427 } 1422 }
1428 1423
1429 } } // namespace v8::base 1424 } } // namespace v8::base
OLDNEW
« no previous file with comments | « src/base/platform/platform-posix.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698