search for: dstate_event_del

Displaying 1 result from an estimated 1 matches for "dstate_event_del".

2009 Nov 14
1
drivers- dynamically adding filedescriptors to poll
...: typedef struct { struct pollfd *fds; nfds_t nfds; event_handler_t *handler; } event_t; typedef struct { struct pollfd fds; void (*callback)(void *data); void *data; } event_handler_t; int dstate_event_poll(event_t *events, int timeout); int dstate_event_add(event_handler_t *handler); int dstate_event_del(event_handler_t *handler); When there is activity on a file descriptor, the handler for that file descriptor would be called with the data provided when the handler was added. This data could be a socket thats used for communication or the query to which this event is related. The above is...