2017-12-09 14:41:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <poll.h>
|
2023-09-18 03:27:12 +00:00
|
|
|
#include <stdint.h>
|
2017-12-09 14:41:09 +00:00
|
|
|
|
|
|
|
// Behaves like poll(3) but works for device files on macOS.
|
2023-06-27 06:25:17 +00:00
|
|
|
// Only supports POLLIN and POLLOUT.
|
2017-12-09 14:41:09 +00:00
|
|
|
int polldev(struct pollfd fds[], nfds_t nfds, int timeout);
|
2023-09-18 03:27:12 +00:00
|
|
|
|
|
|
|
// Generic polling wrapper. It will try and use higher resolution
|
|
|
|
// polling (ppoll) if available.
|
|
|
|
int mp_poll(struct pollfd *fds, int nfds, int64_t timeout_ns);
|