private.h 734 B

1234567891011121314151617181920212223242526272829
  1. #include "faux/faux.h"
  2. #include "faux/list.h"
  3. #include "faux/time.h"
  4. #include "faux/sched.h"
  5. struct faux_ev_s {
  6. struct timespec time; // Planned time of event
  7. struct timespec period; // Period for periodic event
  8. unsigned int cycle_num; // Number of cycles for periodic event
  9. faux_sched_periodic_e periodic; // Periodic flag
  10. int id; // Type of event
  11. void *data; // Arbitrary data linked to event
  12. faux_list_free_fn free_data_cb; // Callback to free user data
  13. };
  14. struct faux_sched_s {
  15. faux_list_t *list;
  16. };
  17. C_DECL_BEGIN
  18. int faux_ev_compare(const void *first, const void *second);
  19. int faux_ev_compare_id(const void *key, const void *list_item);
  20. int faux_ev_compare_data(const void *key, const void *list_item);
  21. C_DECL_END