4.1155-freebsd-126-freebsd-12freebsd-9.3
Last change
on this file since e599318 was
e599318,
checked in by Sebastian Huber <sebastian.huber@…>, on 10/09/13 at 20:52:54
|
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files
are mapped by the translation script:
o rtems/bsd/sys/_types.h
o rtems/bsd/sys/errno.h
o rtems/bsd/sys/lock.h
o rtems/bsd/sys/param.h
o rtems/bsd/sys/resource.h
o rtems/bsd/sys/time.h
o rtems/bsd/sys/timespec.h
o rtems/bsd/sys/types.h
o rtems/bsd/sys/unistd.h
It is now possible to include <sys/socket.h> directly for example.
Generate one Makefile which builds everything including tests.
|
-
Property mode set to
100644
|
File size:
524 bytes
|
Line | |
---|
1 | #include <unistd.h> |
---|
2 | #include <errno.h> |
---|
3 | #include <sys/time.h> |
---|
4 | #include <rtems.h> |
---|
5 | #include <rtems/error.h> |
---|
6 | #include <sys/poll.h> |
---|
7 | |
---|
8 | struct poll_args { |
---|
9 | struct pollfd *fds; |
---|
10 | u_int nfds; |
---|
11 | int timeout; |
---|
12 | }; |
---|
13 | |
---|
14 | int kern_poll( struct thread *td, struct poll_args *uap ); |
---|
15 | |
---|
16 | |
---|
17 | int |
---|
18 | __sys_poll(struct pollfd *fds, unsigned nfds, int timeout) |
---|
19 | { |
---|
20 | struct poll_args uap; |
---|
21 | struct thread *td = rtems_get_curthread(); |
---|
22 | |
---|
23 | uap.fds = fds; |
---|
24 | uap.nfds = nfds; |
---|
25 | uap.timeout = timeout; |
---|
26 | |
---|
27 | kern_poll(td, &uap); |
---|
28 | |
---|
29 | return -1; |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.