io-util: introduce ppoll_usec() helper function

This commit is contained in:
Yu Watanabe
2021-03-04 05:06:43 +09:00
parent 1d61d70abb
commit c4febde9d0
2 changed files with 30 additions and 11 deletions
+2
View File
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <poll.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -18,6 +19,7 @@ int loop_write(int fd, const void *buf, size_t nbytes, bool do_poll);
int pipe_eof(int fd);
int ppoll_usec(struct pollfd *fds, size_t nfds, usec_t timeout);
int fd_wait_for_event(int fd, int event, usec_t timeout);
ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);