11 #ifndef EVENT_H_INCLUDE
12 #define EVENT_H_INCLUDE
21 #define EVENT_LOOP_SIZE 1024
66 #define event_signal(func, args) event_signal_ext(func, args, #func, __FILE__, __LINE__)
int event_loop_put(event_loop_t *event_loop, event_t *event)
int event_loop_enter(scheduler_t *scheduler, void(*)(scheduler_t *), void(*)(scheduler_t *))
Enters the event loop.
void event_destroy(event_t *e)
Free any memory associated with an event.
void event_loop_terminate()
Stops the event loop from executing.
void event_signal_ext(void *func, void *args, char *name, char *s_name, uint16_t s_line)
event_t * event_loop_take(event_loop_t *event_loop)
event_t * event_init(void(*func)(scheduler_t *, void *), void *arg, char *name, char *source_name, uint16_t source_line)
void event_loop_destroy()
Frees any memory associated with the event queue.
struct event_loop event_loop_t
Header file for the scheduler.
GAsyncQueue * queue
The queue that is the core of the event loop.
int terminated
Flag that signals the end of the event loop.
int occupied
Does this loop already have a worker thread.
char * name
Name of the event, used for debugging.
char * source_name
Name of the source file creating the event.
void * argument
The arguments for the function.
uint16_t source_line
Line in the source file creating the event.
char * s_name
Sample source file name.
uint16_t s_line
Sample source line number.