19 #ifndef ASTERISK_ALERTPIPE_H
20 #define ASTERISK_ALERTPIPE_H
25 AST_ALERT_READ_SUCCESS = 0,
26 AST_ALERT_NOT_READABLE,
94 void ast_alertpipe_clear(
int alert_pipe[2]),
96 alert_pipe[0] = alert_pipe[1] = -1;
110 int attribute_pure ast_alertpipe_readable(
int alert_pipe[2]),
112 return alert_pipe[0] > -1;
126 int attribute_pure ast_alertpipe_writable(
int alert_pipe[2]),
128 return alert_pipe[1] > -1;
142 int attribute_pure ast_alertpipe_readfd(
int alert_pipe[2]),
144 return alert_pipe[0];
156 void ast_alertpipe_swap(
int alert_pipe_1[2],
int alert_pipe_2[2]),
158 SWAP(alert_pipe_1[0], alert_pipe_2[0]);
159 SWAP(alert_pipe_1[1], alert_pipe_2[1]);
void ast_alertpipe_close(int alert_pipe[2])
Close an alert pipe.
ast_alert_status_t ast_alertpipe_read(int alert_pipe[2])
Read an event from an alert pipe.
int ast_alertpipe_init(int alert_pipe[2])
Initialize an alert pipe.
ast_alert_status_t ast_alertpipe_flush(int alert_pipe[2])
Consume all alerts written to the alert pipe.
ssize_t ast_alertpipe_write(int alert_pipe[2])
Write an event to an alert pipe.