JustOS/linux-6.13/tools/testing/selftests/bpf/io_helpers.h

8 lines
234 B
C
Raw Permalink Normal View History

2025-01-24 14:00:19 +00:00
// SPDX-License-Identifier: GPL-2.0
#include <unistd.h>
/* As a regular read(2), but allows to specify a timeout in micro-seconds.
* Returns -EAGAIN on timeout.
*/
int read_with_timeout(int fd, char *buf, size_t count, long usec);