OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #ifndef SRC_TOOLS_DRIVER_PLATFORM_H_ | 5 #ifndef SRC_TOOLS_DRIVER_PLATFORM_H_ |
6 #define SRC_TOOLS_DRIVER_PLATFORM_H_ | 6 #define SRC_TOOLS_DRIVER_PLATFORM_H_ |
7 | 7 |
8 namespace fletch { | 8 namespace fletch { |
9 | 9 |
10 // Create a file descriptor from which signals can be read. The file descriptor | 10 // Create a file descriptor from which signals can be read. The file descriptor |
11 // can be used with select, and signal numbers can be read using 'ReadSignal'. | 11 // can be used with select, and signal numbers can be read using 'ReadSignal'. |
12 int SignalFileDescriptor(); | 12 int SignalFileDescriptor(); |
13 | 13 |
14 // Read a signal from a file descriptor created with 'SignalFileDescriptor'. | 14 // Read a signal from a file descriptor created with 'SignalFileDescriptor'. |
15 int ReadSignal(int fd); | 15 int ReadSignal(int fd); |
16 | 16 |
17 // Exit in a platform specific manner. 'exit_code' is encoded as | 17 // Exit in a platform specific manner. 'exit_code' is encoded as |
18 // 'Process.exitCode' in 'dart:io'. | 18 // 'Process.exitCode' in 'dart:io'. |
19 void Exit(int exit_code); | 19 void Exit(int exit_code); |
20 | 20 |
21 } // namespace fletch | 21 } // namespace fletch |
22 | 22 |
23 #endif // SRC_TOOLS_DRIVER_PLATFORM_H_ | 23 #endif // SRC_TOOLS_DRIVER_PLATFORM_H_ |
OLD | NEW |