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 RUNTIME_PLATFORM_SIGNAL_BLOCKER_H_ | 5 #ifndef RUNTIME_PLATFORM_SIGNAL_BLOCKER_H_ |
6 #define RUNTIME_PLATFORM_SIGNAL_BLOCKER_H_ | 6 #define RUNTIME_PLATFORM_SIGNAL_BLOCKER_H_ |
7 | 7 |
8 #include "platform/globals.h" | 8 #include "platform/globals.h" |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 | 10 |
11 #if defined(TARGET_OS_WINDOWS) | 11 #if defined(HOST_OS_WINDOWS) |
12 #error Do not include this file on Windows. | 12 #error Do not include this file on Windows. |
13 #endif | 13 #endif |
14 | 14 |
15 #include <pthread.h> | 15 #include <pthread.h> |
16 #include <signal.h> // NOLINT | 16 #include <signal.h> // NOLINT |
17 | 17 |
18 namespace dart { | 18 namespace dart { |
19 | 19 |
20 class ThreadSignalBlocker { | 20 class ThreadSignalBlocker { |
21 public: | 21 public: |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } while ((__result == -1L) && (errno == EINTR)); \ | 107 } while ((__result == -1L) && (errno == EINTR)); \ |
108 __result; \ | 108 __result; \ |
109 }) | 109 }) |
110 | 110 |
111 #define VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression) \ | 111 #define VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression) \ |
112 (static_cast<void>(TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression))) | 112 (static_cast<void>(TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression))) |
113 | 113 |
114 } // namespace dart | 114 } // namespace dart |
115 | 115 |
116 #endif // RUNTIME_PLATFORM_SIGNAL_BLOCKER_H_ | 116 #endif // RUNTIME_PLATFORM_SIGNAL_BLOCKER_H_ |
OLD | NEW |