aboutsummaryrefslogtreecommitdiff
path: root/fdm.h
diff options
context:
space:
mode:
Diffstat (limited to 'fdm.h')
-rw-r--r--fdm.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fdm.h b/fdm.h
index 8661c580..2ccff958 100644
--- a/fdm.h
+++ b/fdm.h
@@ -4,7 +4,8 @@
struct fdm;
-typedef bool (*fdm_handler_t)(struct fdm *fdm, int fd, int events, void *data);
+typedef bool (*fdm_fd_handler_t)(struct fdm *fdm, int fd, int events, void *data);
+typedef bool (*fdm_signal_handler_t)(struct fdm *fdm, int signo, void *data);
typedef void (*fdm_hook_t)(struct fdm *fdm, void *data);
enum fdm_hook_priority {
@@ -16,7 +17,7 @@ enum fdm_hook_priority {
struct fdm *fdm_init(void);
void fdm_destroy(struct fdm *fdm);
-bool fdm_add(struct fdm *fdm, int fd, int events, fdm_handler_t handler, void *data);
+bool fdm_add(struct fdm *fdm, int fd, int events, fdm_fd_handler_t handler, void *data);
bool fdm_del(struct fdm *fdm, int fd);
bool fdm_del_no_close(struct fdm *fdm, int fd);
@@ -27,4 +28,7 @@ bool fdm_hook_add(struct fdm *fdm, fdm_hook_t hook, void *data,
enum fdm_hook_priority priority);
bool fdm_hook_del(struct fdm *fdm, fdm_hook_t hook, enum fdm_hook_priority priority);
+bool fdm_signal_add(struct fdm *fdm, int signo, fdm_signal_handler_t handler, void *data);
+bool fdm_signal_del(struct fdm *fdm, int signo);
+
bool fdm_poll(struct fdm *fdm);