PatchworkOS
Loading...
Searching...
No Matches
poll.c
Go to the documentation of this file.
1
#include <
stdarg.h
>
2
#include <
stdio.h
>
3
#include <
stdlib.h
>
4
#include <
sys/io.h
>
5
6
#include "
common/print.h
"
7
#include "
user/common/syscalls.h
"
8
9
uint64_t
poll
(
pollfd_t
* fds,
uint64_t
amount,
clock_t
timeout)
10
{
11
uint64_t
result =
_syscall_poll
(fds, amount, timeout);
12
if
(result ==
ERR
)
13
{
14
errno
=
_syscall_errno
();
15
}
16
return
result;
17
}
errno
#define errno
Error number variable.
Definition
errno.h:27
poll
uint64_t poll(pollfd_t *fds, uint64_t amount, clock_t timeout)
System call for polling files.
Definition
poll.c:9
ERR
#define ERR
Integer error value.
Definition
ERR.h:17
clock_t
__UINT64_TYPE__ clock_t
A nanosecond time.
Definition
clock_t.h:13
io.h
print.h
syscalls.h
_syscall_errno
static errno_t _syscall_errno(void)
Definition
syscalls.h:118
_syscall_poll
static uint64_t _syscall_poll(pollfd_t *fds, uint64_t amount, clock_t timeout)
Definition
syscalls.h:183
stdarg.h
uint64_t
__UINT64_TYPE__ uint64_t
Definition
stdint.h:17
stdio.h
stdlib.h
pollfd_t
Poll file descriptor structure.
Definition
io.h:307
src
libstd
user
functions
io
poll.c
Generated by
1.9.8