summaryrefslogtreecommitdiffstats
path: root/freebsd-userspace/rtems/rtems-syspoll.c
blob: d53d14e88e8a7f74109e0cf8de19f4c5cb187290 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <rtems.h>
#include <rtems/error.h>
#include <freebsd/sys/poll.h>

struct poll_args {
        struct pollfd *fds;
        u_int   nfds;
        int     timeout;
};

int kern_poll( struct thread *td, struct poll_args *uap );


int 
__sys_poll(struct pollfd *fds, unsigned nfds, int timeout)
{
  struct poll_args uap;
  struct thread *td = rtems_get_curthread();

  uap.fds = fds;
  uap.nfds = nfds;
  uap.timeout = timeout;

  kern_poll(td, &uap);

  return -1;
}