smarty template cache syncing daemon (PoC)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
698B

  1. #ifndef _EVENT_H_
  2. #define _EVENT_H_
  3. #include <sys/time.h>
  4. #define FD_READ 0x01
  5. #define FD_WRITE 0x02
  6. #define FD_EXCEPT 0x04
  7. #define event_add_readfd(fd, callback, privdata) \
  8. event_add_fd(fd, FD_READ, callback, privdata)
  9. #define event_add_writefd(fd, callback, privdata) \
  10. event_add_fd(fd, FD_WRITE, callback, privdata)
  11. #define event_add_exceptfd(fd, callback, privdata) \
  12. event_add_fd(fd, FD_EXCEPT, callback, privdata)
  13. int event_add_fd(int fd, int type, int (*callback)(int fd, void *privdata), void *privdata);
  14. int event_add_timeout(struct timeval *timeout, int (*callback)(void *privdata), void *privdata);
  15. int event_remove_fd(int fd);
  16. int event_loop(void);
  17. #endif /* _EVENT_H_ */