libosmocore  0.9.3
Osmocom core library
include/osmocom/core/select.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <osmocom/core/linuxlist.h>
00004 
00014 #define BSC_FD_READ     0x0001
00015 
00016 #define BSC_FD_WRITE    0x0002
00017 
00018 #define BSC_FD_EXCEPT   0x0004
00019 
00021 struct osmo_fd {
00023         struct llist_head list; 
00025         int fd;
00028         unsigned int when;
00031         int (*cb)(struct osmo_fd *fd, unsigned int what);
00033         void *data;
00035         unsigned int priv_nr;
00036 };
00037 
00038 int osmo_fd_register(struct osmo_fd *fd);
00039 void osmo_fd_unregister(struct osmo_fd *fd);
00040 int osmo_select_main(int polling);
00041