summaryrefslogtreecommitdiffstats
path: root/include/osmocore/select.h
diff options
context:
space:
mode:
authorHarald Welte2010-02-20 20:34:29 +0100
committerHarald Welte2010-02-20 20:34:29 +0100
commitec8b4501c7b0bfb286db7789635168d1b84f9105 (patch)
tree0db0073e589513d803d2b5be80580191e215dbe3 /include/osmocore/select.h
downloadlibosmocore-ec8b4501c7b0bfb286db7789635168d1b84f9105.tar.gz
libosmocore-ec8b4501c7b0bfb286db7789635168d1b84f9105.tar.xz
libosmocore-ec8b4501c7b0bfb286db7789635168d1b84f9105.zip
intial checkin of the libosmocore project
Diffstat (limited to 'include/osmocore/select.h')
-rw-r--r--include/osmocore/select.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/osmocore/select.h b/include/osmocore/select.h
new file mode 100644
index 0000000..2d8b3ec
--- /dev/null
+++ b/include/osmocore/select.h
@@ -0,0 +1,22 @@
+#ifndef _BSC_SELECT_H
+#define _BSC_SELECT_H
+
+#include "linuxlist.h"
+
+#define BSC_FD_READ 0x0001
+#define BSC_FD_WRITE 0x0002
+#define BSC_FD_EXCEPT 0x0004
+
+struct bsc_fd {
+ struct llist_head list;
+ int fd;
+ unsigned int when;
+ int (*cb)(struct bsc_fd *fd, unsigned int what);
+ void *data;
+ unsigned int priv_nr;
+};
+
+int bsc_register_fd(struct bsc_fd *fd);
+void bsc_unregister_fd(struct bsc_fd *fd);
+int bsc_select_main(int polling);
+#endif /* _BSC_SELECT_H */