Add a self_pipe set of convenience functions

This commit is contained in:
Alex Young
2012-06-01 16:25:27 +01:00
parent 91ab715659
commit 1ddb3bb609
4 changed files with 356 additions and 0 deletions

16
src/self_pipe.h Normal file
View File

@@ -0,0 +1,16 @@
#define SELF_PIPE_H
#include <sys/select.h>
struct self_pipe {
int read_fd;
int write_fd;
};
struct self_pipe * self_pipe_create(void);
int self_pipe_signal( struct self_pipe * sig );
int self_pipe_signal_clear( struct self_pipe *sig );
int self_pipe_destroy( struct self_pipe * sig );
int self_pipe_fd_set( struct self_pipe * sig, fd_set * fds );
int self_pipe_fd_isset( struct self_pipe *sig, fd_set *fds );