32# include <sys/eventfd.h>
42 int fd = eventfd(0, EFD_NONBLOCK | EFD_SEMAPHORE);
48 ast_log(
LOG_WARNING,
"Failed to create alert pipe with eventfd(), falling back to pipe(): %s\n",
146 if (bytes_read < 0) {
147 if (
errno == EINTR) {
150 if (
errno == EAGAIN ||
errno == EWOULDBLOCK) {
void ast_alertpipe_close(int alert_pipe[2])
Close an alert pipe.
ssize_t ast_alertpipe_write(int alert_pipe[2])
Write an event to an alert pipe.
ast_alert_status_t ast_alertpipe_flush(int alert_pipe[2])
Consume all alerts written to the alert pipe.
int ast_alertpipe_init(int alert_pipe[2])
Initialize an alert pipe.
ast_alert_status_t ast_alertpipe_read(int alert_pipe[2])
Read an event from an alert pipe.
void ast_alertpipe_clear(int alert_pipe[2])
Sets the alert pipe file descriptors to default values.
int ast_alertpipe_readable(int alert_pipe[2])
Determine if the alert pipe is readable.
int ast_alertpipe_writable(int alert_pipe[2])
Determine if the alert pipe is writable.
Asterisk main include file. File version handling, generic pbx functions.
Support for logging to various files, console and syslog Configuration in file logger....
#define ast_fd_set_flags(fd, flags)
Set flags on the given file descriptor.