Flutter Engine
eintr_wrapper.h File Reference
#include <cerrno>
#include "tonic/common/build_config.h"

Go to the source code of this file.

Macros

#define HANDLE_EINTR(x)
 
#define IGNORE_EINTR(x)
 

Macro Definition Documentation

◆ HANDLE_EINTR

#define 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 filesystem::ReadFileDescriptorToBytes().

◆ IGNORE_EINTR

#define 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.

Referenced by filesystem::Descriptor::~Descriptor().