Chromium Code Reviews| Index: runtime/platform/signal_blocker.h |
| diff --git a/runtime/platform/signal_blocker.h b/runtime/platform/signal_blocker.h |
| index 4bfc2287a6ed4150fc77ef51cfaee82326e05cfa..356ad3632827f65b8a5267e97b35aeea37295cd6 100644 |
| --- a/runtime/platform/signal_blocker.h |
| +++ b/runtime/platform/signal_blocker.h |
| @@ -79,6 +79,18 @@ class ThreadSignalBlocker { |
| #define VOID_NO_RETRY_EXPECTED(expression) \ |
| (static_cast<void>(NO_RETRY_EXPECTED(expression))) |
| +// Versions of the above, that does not enter a signal blocking scope. Use only |
| +// when a signal blocking scope is entered manually. |
| +#define TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression) \ |
|
Søren Gjesse
2014/03/25 08:21:23
It would be great if this macro could check that a
Anders Johnsen
2014/03/25 13:06:03
I've changed it to validate in debug mode, that it
|
| + ({ intptr_t __result; \ |
| + do { \ |
| + __result = (expression); \ |
| + } while ((__result == -1L) && (errno == EINTR)); \ |
| + __result; }) |
| + |
| +#define VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression) \ |
| + (static_cast<void>(TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(expression))) |
| + |
| } // namespace dart |
| #endif // PLATFORM_SIGNAL_BLOCKER_H_ |