aboutsummaryrefslogtreecommitdiff
path: root/runloop.h
diff options
context:
space:
mode:
Diffstat (limited to 'runloop.h')
-rw-r--r--runloop.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/runloop.h b/runloop.h
new file mode 100644
index 0000000..fc1f7e8
--- /dev/null
+++ b/runloop.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include "global.h"
+
+
+// Return true to remove fd from runloop
+typedef bool runloop_callback(int fd);
+
+void runloop_add_fd(int fd,runloop_callback *func);
+void runloop_run(void); // Returns when empty