8 #ifndef __SOLAR_CAPTURE_EVENT_H__
9 #define __SOLAR_CAPTURE_EVENT_H__
11 #include <sys/epoll.h>
60 struct sc_thread* thread);
80 return cb->cb_link.
next != &cb->cb_link;
135 extern int sc_epoll_ctl(
struct sc_thread* thread,
int op,
int fd,
static void sc_dlist_init(struct sc_dlist *list)
Initialise a pre-allocated sc_dlist to be an empty doubly linked list.
Definition: dlist.h:107
void( sc_callback_handler_fn)(struct sc_callback *, void *event_info)
A callback handler function.
Definition: event.h:24
sc_callback_handler_fn * cb_handler_fn
Definition: event.h:35
static void sc_dlist_remove(struct sc_dlist *l)
Remove an item from the list.
Definition: dlist.h:145
Doubly linked list pointers.
Definition: dlist.h:60
static void sc_callback_remove(struct sc_callback *cb)
Unregister a callback object from its event source.
Definition: event.h:91
int sc_callback_alloc(struct sc_callback **cb_out, const struct sc_attr *attr, struct sc_thread *thread)
Allocate a callback object instance.
struct sc_dlist * next
Definition: dlist.h:62
void sc_callback_on_idle(struct sc_callback *cb)
Request a callback when the thread is idle.
static int sc_callback_is_active(const struct sc_callback *cb)
Returns true if a callback object is active.
Definition: event.h:78
void sc_callback_free(struct sc_callback *cb)
Free a callback object instance.
int sc_epoll_ctl(struct sc_thread *thread, int op, int fd, unsigned events, struct sc_callback *cb)
Request a callback when the thread is idle.
void * cb_private
Definition: event.h:34
A callback object.
Definition: event.h:33