Remove counter from eintr wrapper (flutter/engine#26124)

Fixes https://github.com/flutter/flutter/issues/82226

On linux/lldb there are sometimes  spurious EINTR errors
when starting an isolate (without an apparent reason).
This results in threads being prematurely terminated.
This commit is contained in:
Matej Knopp
2021-05-16 12:58:24 +02:00
committed by GitHub
parent e1658dd10a
commit 4e8195b153

View File

@@ -17,8 +17,6 @@
#else
#if defined(NDEBUG)
#define FML_HANDLE_EINTR(x) \
({ \
decltype(x) eintr_wrapper_result; \
@@ -28,21 +26,6 @@
eintr_wrapper_result; \
})
#else
#define FML_HANDLE_EINTR(x) \
({ \
int eintr_wrapper_counter = 0; \
decltype(x) eintr_wrapper_result; \
do { \
eintr_wrapper_result = (x); \
} while (eintr_wrapper_result == -1 && errno == EINTR && \
eintr_wrapper_counter++ < 100); \
eintr_wrapper_result; \
})
#endif // NDEBUG
#define FML_IGNORE_EINTR(x) \
({ \
decltype(x) eintr_wrapper_result; \