OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include <process.h> | 5 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_WINDOWS) |
| 7 |
| 8 #include <process.h> // NOLINT |
6 | 9 |
7 #include "bin/builtin.h" | 10 #include "bin/builtin.h" |
8 #include "bin/process.h" | 11 #include "bin/process.h" |
9 #include "bin/eventhandler.h" | 12 #include "bin/eventhandler.h" |
10 #include "bin/log.h" | 13 #include "bin/log.h" |
11 #include "bin/thread.h" | 14 #include "bin/thread.h" |
12 #include "bin/utils.h" | 15 #include "bin/utils.h" |
13 #include "platform/globals.h" | |
14 | 16 |
15 static const int kReadHandle = 0; | 17 static const int kReadHandle = 0; |
16 static const int kWriteHandle = 1; | 18 static const int kWriteHandle = 1; |
17 | 19 |
18 | 20 |
19 // ProcessInfo is used to map a process id to the process handle, | 21 // ProcessInfo is used to map a process id to the process handle, |
20 // wait handle for registered exit code event and the pipe used to | 22 // wait handle for registered exit code event and the pipe used to |
21 // communicate the exit code of the process to Dart. | 23 // communicate the exit code of the process to Dart. |
22 // ProcessInfo objects are kept in the static singly-linked | 24 // ProcessInfo objects are kept in the static singly-linked |
23 // ProcessInfoList. | 25 // ProcessInfoList. |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 655 |
654 | 656 |
655 void Process::TerminateExitCodeHandler() { | 657 void Process::TerminateExitCodeHandler() { |
656 // Nothing needs to be done on Windows. | 658 // Nothing needs to be done on Windows. |
657 } | 659 } |
658 | 660 |
659 | 661 |
660 intptr_t Process::CurrentProcessId() { | 662 intptr_t Process::CurrentProcessId() { |
661 return static_cast<intptr_t>(GetCurrentProcessId()); | 663 return static_cast<intptr_t>(GetCurrentProcessId()); |
662 } | 664 } |
| 665 |
| 666 #endif // defined(TARGET_OS_WINDOWS) |
OLD | NEW |