vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / poll.c
blobcbd0f37c2cea8e51874d99bf4893b486a6fad2c3
1 /*
2 * Copyright 2002-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <poll.h>
9 #include <errno.h>
10 #include <pthread.h>
12 #include <syscall_utils.h>
14 #include <errno_private.h>
15 #include <syscalls.h>
18 int
19 poll(struct pollfd *fds, nfds_t numfds, int timeout)
21 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_poll(fds, numfds, timeout * 1000LL));