Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: runtime/platform/globals.h

Issue 165723007: Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tiny fix. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/stdio_macos.cc ('k') | runtime/platform/platform_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 6001a2fd43121dfa9d761784802e1a8690bd3fca..126990360ef11f3f83b0e900ba4a16d4c4c0ea1e 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -474,24 +474,12 @@ inline D bit_copy(const S& source) {
#endif
#if !defined(TARGET_OS_WINDOWS)
-#if !defined(TEMP_FAILURE_RETRY)
-// TEMP_FAILURE_RETRY is defined in unistd.h on some platforms. The
-// definition below is copied from Linux and adapted to avoid lint
-// errors (type long int changed to intptr_t and do/while split on
-// separate lines with body in {}s).
-#define TEMP_FAILURE_RETRY(expression) \
- ({ intptr_t __result; \
- do { \
- __result = (expression); \
- } while ((__result == -1L) && (errno == EINTR)); \
- __result; })
-#endif // !defined(TEMP_FAILURE_RETRY)
-
-// This is a version of TEMP_FAILURE_RETRY which does not use the value
-// returned from the expression.
-#define VOID_TEMP_FAILURE_RETRY(expression) \
- (static_cast<void>(TEMP_FAILURE_RETRY(expression)))
-
+#if defined(TEMP_FAILURE_RETRY)
+// TEMP_FAILURE_RETRY is defined in unistd.h on some platforms. We should
+// not use that version, but instead the one in signal_blocker.h, to ensure
+// we disable signal interrupts.
+#undef TEMP_FAILURE_RETRY
+#endif // defined(TEMP_FAILURE_RETRY)
#endif // !defined(TARGET_OS_WINDOWS)
#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS)
« no previous file with comments | « runtime/bin/stdio_macos.cc ('k') | runtime/platform/platform_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698