22 #ifndef LELY_EV_POLL_H_ 23 #define LELY_EV_POLL_H_ 27 #ifndef LELY_EV_POLL_INLINE 28 #define LELY_EV_POLL_INLINE static inline 39 void *(*self)(
const ev_poll_t *poll);
40 int (*wait)(ev_poll_t *poll,
int timeout);
41 int (*kill)(ev_poll_t *poll,
void *thr);
48 LELY_EV_POLL_INLINE
void *
ev_poll_self(
const ev_poll_t *poll);
58 LELY_EV_POLL_INLINE
int ev_poll_wait(ev_poll_t *poll,
int timeout);
66 LELY_EV_POLL_INLINE
int ev_poll_kill(ev_poll_t *poll,
void *thr);
71 return (*poll)->self(poll);
77 return (*poll)->wait(poll, timeout);
83 return (*poll)->kill(poll, thr);
90 #endif // !LELY_EV_POLL_H_
int ev_poll_wait(ev_poll_t *poll, int timeout)
Waits for at most timeout milliseconds while polling for new events.
This is the public header file of the event library.
const struct ev_poll_vtbl *const ev_poll_t
The abstract polling interface.
int ev_poll_kill(ev_poll_t *poll, void *thr)
Interrupts a polling wait on the specified thread.
void * ev_poll_self(const ev_poll_t *poll)
Returns the identifier of the calling thread.