OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #ifndef PLATFORM_SIGNAL_BLOCKER_H_ | 5 #ifndef PLATFORM_SIGNAL_BLOCKER_H_ |
6 #define PLATFORM_SIGNAL_BLOCKER_H_ | 6 #define PLATFORM_SIGNAL_BLOCKER_H_ |
7 | 7 |
8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
| 9 #include "platform/assert.h" |
9 | 10 |
10 #if defined(TARGET_OS_WINDOWS) | 11 #if defined(TARGET_OS_WINDOWS) |
11 #error Do not include this file on Windows. | 12 #error Do not include this file on Windows. |
12 #endif | 13 #endif |
13 | 14 |
14 #include <signal.h> // NOLINT | 15 #include <signal.h> // NOLINT |
15 | 16 |
16 namespace dart { | 17 namespace dart { |
17 | 18 |
18 class ThreadSignalBlocker { | 19 class ThreadSignalBlocker { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 __result = (expression); \ | 98 __result = (expression); \ |
98 } while ((__result == -1L) && (errno == EINTR)); \ | 99 } while ((__result == -1L) && (errno == EINTR)); \ |
99 __result; }) | 100 __result; }) |
100 | 101 |
101 #define VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression) \ | 102 #define VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression) \ |
102 (static_cast<void>(TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression))) | 103 (static_cast<void>(TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression))) |
103 | 104 |
104 } // namespace dart | 105 } // namespace dart |
105 | 106 |
106 #endif // PLATFORM_SIGNAL_BLOCKER_H_ | 107 #endif // PLATFORM_SIGNAL_BLOCKER_H_ |
OLD | NEW |