Flutter Engine
eintr_wrapper.h File Reference
#include <errno.h>
#include "flutter/fml/build_config.h"

Go to the source code of this file.

Macros

#define FML_HANDLE_EINTR(x)
 
#define FML_IGNORE_EINTR(x)
 

Macro Definition Documentation

◆ FML_HANDLE_EINTR

#define FML_HANDLE_EINTR (   x)
Value:
({ \
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; \
})

Definition at line 33 of file eintr_wrapper.h.

Referenced by fml::Duplicate(), fml::OpenDirectory(), fml::OpenFile(), fml::TimerDrain(), fml::PlatformSemaphore::TryWait(), and fml::WriteAtomically().

◆ FML_IGNORE_EINTR

#define FML_IGNORE_EINTR (   x)
Value:
({ \
decltype(x) eintr_wrapper_result; \
do { \
eintr_wrapper_result = (x); \
if (eintr_wrapper_result == -1 && errno == EINTR) { \
eintr_wrapper_result = 0; \
} \
} while (0); \
eintr_wrapper_result; \
})

Definition at line 46 of file eintr_wrapper.h.