#include "platform/assert.h"
#include "platform/globals.h"
#include <pthread.h>
#include <signal.h>
Go to the source code of this file.
◆ CHECK_IS_BLOCKING
#define CHECK_IS_BLOCKING |
( |
|
signal | ) |
|
Value: ({ \
sigset_t signal_mask; \
int __r = pthread_sigmask(SIG_BLOCK, nullptr, &signal_mask); \
USE(__r); \
ASSERT(__r == 0); \
sigismember(&signal_mask, signal); \
})
Definition at line 88 of file signal_blocker.h.
◆ NO_RETRY_EXPECTED
#define NO_RETRY_EXPECTED |
( |
|
expression | ) |
|
Value: ({ \
intptr_t __result = (expression); \
if (__result == -1L && errno == EINTR) { \
FATAL("Unexpected EINTR errno"); \
} \
__result; \
})
Definition at line 75 of file signal_blocker.h.
◆ TEMP_FAILURE_RETRY
#define TEMP_FAILURE_RETRY |
( |
|
expression | ) |
|
Value: ({ \
ThreadSignalBlocker tsb(SIGPROF); \
intptr_t __result; \
do { \
__result = (expression); \
} while ((__result == -1L) && (errno == EINTR)); \
__result; \
})
Definition at line 58 of file signal_blocker.h.
◆ TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER
#define TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER |
( |
|
expression | ) |
|
Value: ({ \
intptr_t __result; \
do { \
__result = (expression); \
} while ((__result == -1L) && (errno == EINTR)); \
__result; \
})
#define CHECK_IS_BLOCKING(signal)
Definition at line 99 of file signal_blocker.h.
◆ VOID_NO_RETRY_EXPECTED
#define VOID_NO_RETRY_EXPECTED |
( |
|
expression | ) |
(static_cast<void>(NO_RETRY_EXPECTED(expression))) |
◆ VOID_TEMP_FAILURE_RETRY
#define VOID_TEMP_FAILURE_RETRY |
( |
|
expression | ) |
(static_cast<void>(TEMP_FAILURE_RETRY(expression))) |
◆ VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER