2017-12-09 15:41:09 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <poll.h>
|
2023-09-18 05:27:12 +02:00
|
|
|
#include <stdint.h>
|
2017-12-09 15:41:09 +01:00
|
|
|
|
|
|
|
// Behaves like poll(3) but works for device files on macOS.
|
2023-06-27 08:25:17 +02:00
|
|
|
// Only supports POLLIN and POLLOUT.
|
2017-12-09 15:41:09 +01:00
|
|
|
int polldev(struct pollfd fds[], nfds_t nfds, int timeout);
|
2023-09-18 05:27:12 +02: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);
|