libosmocore  0.9.3
Osmocom core library
select.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <osmocom/core/linuxlist.h>
4 
14 #define BSC_FD_READ 0x0001
15 
16 #define BSC_FD_WRITE 0x0002
17 
18 #define BSC_FD_EXCEPT 0x0004
19 
21 struct osmo_fd {
23  struct llist_head list;
25  int fd;
28  unsigned int when;
31  int (*cb)(struct osmo_fd *fd, unsigned int what);
33  void *data;
35  unsigned int priv_nr;
36 };
37 
38 int osmo_fd_register(struct osmo_fd *fd);
39 void osmo_fd_unregister(struct osmo_fd *fd);
40 int osmo_select_main(int polling);
41