aboutsummaryrefslogtreecommitdiffstats
path: root/util/alevt/fdset.h
diff options
context:
space:
mode:
authorMark Purcell <msp@debian.org>2010-02-25 21:13:46 +1100
committeretobi <git@e-tobi.net>2013-09-03 09:48:46 +0200
commit665818f1969f893f05edf5b70eb1804c89b2829e (patch)
tree34ba68cee03c52d769a5a51b456b7e9d63cd091a /util/alevt/fdset.h
parent109c7947d6a11a2a54eff1b19615ed80ea2f0602 (diff)
parent9fe4d4ea9c054e539ab679ed2e9c076c35beb69d (diff)
downloadlinux-dvb-apps-665818f1969f893f05edf5b70eb1804c89b2829e.tar.gz
Imported Debian patch 1.1.1+rev1355-1debian/1.1.1+rev1355-1
Diffstat (limited to 'util/alevt/fdset.h')
-rw-r--r--util/alevt/fdset.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/util/alevt/fdset.h b/util/alevt/fdset.h
new file mode 100644
index 0000000..4b786e6
--- /dev/null
+++ b/util/alevt/fdset.h
@@ -0,0 +1,28 @@
+#ifndef FDSET_H
+#define FDSET_H
+
+#include "dllist.h"
+
+
+struct fdset
+{
+ struct dl_head list[1];
+ int del_count;
+};
+
+
+struct fdset_node /*internal*/
+{
+ struct dl_node node[1];
+ int fd;
+ void (*handler)(void *data, int fd);
+ void *data;
+};
+
+extern struct fdset fds[1]; /* global fd list */
+
+int fdset_init(struct fdset *fds);
+int fdset_add_fd(struct fdset *fds, int fd, void *handler, void *data);
+int fdset_del_fd(struct fdset *fds, int fd);
+int fdset_select(struct fdset *fds, int timeout /*millisec*/);
+#endif