private.h 735 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #include "faux/faux.h"
  2. #include "faux/list.h"
  3. #include "faux/net.h"
  4. #include "faux/vec.h"
  5. #include "faux/sched.h"
  6. struct faux_eloop_s {
  7. faux_eloop_cb_f *default_event_cb;
  8. faux_list_t *scheds;
  9. faux_sched_t *faux_sched;
  10. faux_list_t *fds;
  11. faux_pollfd_t *pollfds;
  12. faux_list_t *signals;
  13. sigset_t sig_set;
  14. };
  15. typedef struct faux_eloop_context_s {
  16. faux_eloop_cb_f *event_cb;
  17. void *user_data;
  18. } faux_eloop_context_t;
  19. typedef struct faux_eloop_shed_s {
  20. int ev_id;
  21. faux_eloop_context_t context;
  22. } faux_eloop_sched_t;
  23. typedef struct faux_eloop_fd_s {
  24. int fd;
  25. short events;
  26. faux_eloop_context_t context;
  27. } faux_eloop_fd_t;
  28. typedef struct faux_eloop_signal_s {
  29. int signo;
  30. faux_eloop_context_t context;
  31. } faux_eloop_signal_t;