22 #ifndef LELY_EV_EXEC_H_ 23 #define LELY_EV_EXEC_H_ 29 #ifndef LELY_EV_EXEC_INLINE 30 #define LELY_EV_EXEC_INLINE static inline 110 (*exec)->on_task_init(exec);
116 (*exec)->on_task_fini(exec);
122 return (*exec)->dispatch(exec, task);
128 (*exec)->post(exec, task);
134 (*exec)->defer(exec, task);
140 return (*exec)->abort(exec, task);
146 (*exec)->run(exec, task);
153 #endif // !LELY_EV_EXEC_H_ void ev_exec_post(ev_exec_t *exec, struct ev_task *task)
Submits *task to *exec for execution.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
void ev_exec_defer(ev_exec_t *exec, struct ev_task *task)
Submits *task to *exec for execution.
void ev_exec_on_task_fini(ev_exec_t *exec)
Undoes the effect of a previous call to ev_exec_on_task_init().
size_t ev_exec_abort(ev_exec_t *exec, struct ev_task *task)
Aborts the specified task submitted to *exec, if it has not yet begun executing, or all pending tasks...
ev_exec_t * exec
A pointer to the executor to which the task is (to be) submitted.
void ev_exec_on_task_init(ev_exec_t *exec)
Indicates to the specified executor that a task will be submitted for execution in the future...
This is the public header file of the event library.
This header file is part of the C11 and POSIX compatibility library; it includes <stddef.h> and defines any missing functionality.
int ev_exec_dispatch(ev_exec_t *exec, struct ev_task *task)
Submits *task to *exec for execution.
void ev_exec_run(ev_exec_t *exec, struct ev_task *task)
Invokes the task function in *task as if the task is being executed by *exec.