mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
aio / timers: add ppoll support with qemu_poll_ns
Add qemu_poll_ns which works like g_poll but takes a nanosecond timeout. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
043a7e1f8f
commit
4e0c6529fc
3 changed files with 55 additions and 0 deletions
|
@ -63,6 +63,18 @@ int64_t qemu_clock_deadline_ns(QEMUClock *clock);
|
|||
*/
|
||||
int qemu_timeout_ns_to_ms(int64_t ns);
|
||||
|
||||
/**
|
||||
* qemu_poll_ns:
|
||||
* @fds: Array of file descriptors
|
||||
* @nfds: number of file descriptors
|
||||
* @timeout: timeout in nanoseconds
|
||||
*
|
||||
* Perform a poll like g_poll but with a timeout in nanoseconds.
|
||||
* See g_poll documentation for further details.
|
||||
*
|
||||
* Returns: number of fds ready
|
||||
*/
|
||||
int qemu_poll_ns(GPollFD *fds, guint nfds, int64_t timeout);
|
||||
void qemu_clock_enable(QEMUClock *clock, bool enabled);
|
||||
void qemu_clock_warp(QEMUClock *clock);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue