Lely core libraries  2.3.4
std_exec.h
Go to the documentation of this file.
1 
27 #ifndef LELY_EV_STD_EXEC_H_
28 #define LELY_EV_STD_EXEC_H_
29 
30 #include <lely/ev/ev.h>
31 
32 #include <stddef.h>
33 
34 typedef const struct ev_std_exec_impl_vtbl *const ev_std_exec_impl_t;
35 
36 struct ev_std_exec {
37  const struct ev_exec_vtbl *exec_vptr;
38  ev_std_exec_impl_t *impl;
39 };
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
46  void (*on_task_init)(ev_std_exec_impl_t *impl);
47  void (*on_task_fini)(ev_std_exec_impl_t *impl);
48  void (*post)(ev_std_exec_impl_t *impl, struct ev_task *task);
49  size_t (*abort)(ev_std_exec_impl_t *impl, struct ev_task *task);
50 };
51 
52 void *ev_std_exec_alloc(void);
53 void ev_std_exec_free(void *ptr);
54 ev_exec_t *ev_std_exec_init(ev_exec_t *exec, ev_std_exec_impl_t *impl);
55 void ev_std_exec_fini(ev_exec_t *exec);
56 
57 ev_exec_t *ev_std_exec_create(ev_std_exec_impl_t *impl);
58 void ev_std_exec_destroy(ev_exec_t *exec);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif // !LELY_EV_STD_EXEC_H_
This is the public header file of the event library.
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
Definition: ev.h:29
This header file is part of the C11 and POSIX compatibility library; it includes <stddef....
An executable task.
Definition: task.h:41
ev_exec_t * exec
A pointer to the executor to which the task is (to be) submitted.
Definition: task.h:43