OLD | NEW |
1 #include <string.h> | 1 #include <string.h> |
2 #include <sys/stat.h> | 2 #include <sys/stat.h> |
3 #include <time.h> | 3 #include <time.h> |
4 #include <nacl_stat.h> | 4 #include <nacl_stat.h> |
5 #include <nacl_syscalls.h> | 5 #include <nacl_syscalls.h> |
6 #define stat nacl_abi_stat | 6 #define stat nacl_abi_stat |
7 #include <irt.h> | 7 #include <irt.h> |
8 #undef stat | 8 #undef stat |
9 #include <irt_syscalls.h> | 9 #include <irt_syscalls.h> |
10 #ifdef IS_IN_rtld | 10 #ifdef IS_IN_rtld |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 int (*__nacl_irt_close) (int fd); | 298 int (*__nacl_irt_close) (int fd); |
299 int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread); | 299 int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread); |
300 int (*__nacl_irt_write) (int fd, const void *buf, size_t count, size_t *nwrote); | 300 int (*__nacl_irt_write) (int fd, const void *buf, size_t count, size_t *nwrote); |
301 int (*__nacl_irt_seek) (int fd, off_t offset, int whence, off_t *new_offset); | 301 int (*__nacl_irt_seek) (int fd, off_t offset, int whence, off_t *new_offset); |
302 int (*__nacl_irt_dup) (int fd, int *newfd); | 302 int (*__nacl_irt_dup) (int fd, int *newfd); |
303 int (*__nacl_irt_dup2) (int fd, int newfd); | 303 int (*__nacl_irt_dup2) (int fd, int newfd); |
304 int (*__nacl_irt_fstat) (int fd, struct nacl_abi_stat *); | 304 int (*__nacl_irt_fstat) (int fd, struct nacl_abi_stat *); |
305 int (*__nacl_irt_stat) (const char *pathname, struct nacl_abi_stat *); | 305 int (*__nacl_irt_stat) (const char *pathname, struct nacl_abi_stat *); |
306 int (*__nacl_irt_getdents) (int fd, struct dirent *, size_t count, | 306 int (*__nacl_irt_getdents) (int fd, struct dirent *, size_t count, |
307 size_t *nread); | 307 size_t *nread); |
| 308 int (*__nacl_irt_socket) (int domain, int type, int protocol); |
| 309 int (*__nacl_irt_accept) (int sockfd, struct sockaddr *addr, |
| 310 socklen_t *addrlen); |
| 311 int (*__nacl_irt_bind) (int sockfd, const struct sockaddr *addr, socklen_t addrl
en); |
| 312 int (*__nacl_irt_listen) (int sockfd, int backlog); |
| 313 int (*__nacl_irt_connect) (int sockfd, const struct sockaddr *addr, |
| 314 socklen_t addrlen); |
| 315 int (*__nacl_irt_send) (int sockfd, const void *buf, size_t len, int flags, |
| 316 int* ret); |
| 317 int (*__nacl_irt_sendmsg) (int sockfd, const struct msghdr *msg, int flags, |
| 318 int* ret); |
| 319 int (*__nacl_irt_sendto) (int sockfd, const void *buf, size_t len, int flags, |
| 320 const struct sockaddr *dest_addr, socklen_t addrlen, |
| 321 int* ret); |
| 322 int (*__nacl_irt_recv) (int sockfd, void *buf, size_t len, int flags, int* ret); |
| 323 int (*__nacl_irt_recvmsg) (int sockfd, struct msghdr *msg, int flags, int* ret); |
| 324 int (*__nacl_irt_recvfrom) (int sockfd, void *buf, size_t len, int flags, |
| 325 struct sockaddr *dest_addr, socklen_t* addrlen, int*
ret); |
| 326 |
| 327 int (*__nacl_irt_epoll_create) (int size); |
| 328 int (*__nacl_irt_epoll_create1 )(int flags); |
| 329 int (*__nacl_irt_epoll_ctl) (int epfd, int op, int fd, |
| 330 struct epoll_event *event); |
| 331 int (*__nacl_irt_epoll_pwait) (int epfd, struct epoll_event *events, |
| 332 int maxevents, int timeout, |
| 333 const sigset_t *sigmask, size_t sigset_size); |
| 334 int (*__nacl_irt_epoll_wait) (int epfd, struct epoll_event *events, |
| 335 int maxevents, int timeout); |
| 336 int (*__nacl_irt_poll) (struct pollfd *fds, nfds_t nfds, |
| 337 int timeout); |
| 338 int (*__nacl_irt_ppoll) (struct pollfd *fds, nfds_t nfds, |
| 339 const struct timespec *timeout, |
| 340 const sigset_t *sigmask, size_t sigset_size); |
| 341 int (*__nacl_irt_select) (int nfds, fd_set *readfds, |
| 342 fd_set *writefds, fd_set *exceptfds, |
| 343 const struct timeval *timeout); |
| 344 int (*__nacl_irt_pselect) (int nfds, fd_set *readfds, |
| 345 fd_set *writefds, fd_set *exceptfds, |
| 346 const struct timeval *timeout, void* sigmask); |
| 347 int (*__nacl_irt_getpeername) (int sockfd, struct sockaddr *addr, |
| 348 socklen_t *addrlen); |
| 349 int (*__nacl_irt_getsockname) (int sockfd, struct sockaddr *addr, |
| 350 socklen_t *addrlen); |
| 351 int (*__nacl_irt_getsockopt) (int sockfd, int level, int optname, |
| 352 void *optval, socklen_t *optlen); |
| 353 int (*__nacl_irt_setsockopt) (int sockfd, int level, int optname, |
| 354 const void *optval, socklen_t optlen); |
| 355 int (*__nacl_irt_socketpair) (int domain, int type, int protocol, int sv[2]); |
| 356 int (*__nacl_irt_shutdown) (int sockfd, int how); |
| 357 |
308 | 358 |
309 int (*__nacl_irt_sysbrk) (void **newbrk); | 359 int (*__nacl_irt_sysbrk) (void **newbrk); |
310 int (*__nacl_irt_mmap) (void **addr, size_t len, int prot, int flags, | 360 int (*__nacl_irt_mmap) (void **addr, size_t len, int prot, int flags, |
311 int fd, off_t off); | 361 int fd, off_t off); |
312 int (*__nacl_irt_munmap) (void *addr, size_t len); | 362 int (*__nacl_irt_munmap) (void *addr, size_t len); |
313 | 363 |
314 int (*__nacl_irt_dyncode_create) (void *dest, const void *src, size_t size); | 364 int (*__nacl_irt_dyncode_create) (void *dest, const void *src, size_t size); |
315 int (*__nacl_irt_dyncode_modify) (void *dest, const void *src, size_t size); | 365 int (*__nacl_irt_dyncode_modify) (void *dest, const void *src, size_t size); |
316 int (*__nacl_irt_dyncode_delete) (void *dest, size_t size); | 366 int (*__nacl_irt_dyncode_delete) (void *dest, size_t size); |
317 | 367 |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 __nacl_irt_clock_gettime = nacl_irt_clock_gettime; | 602 __nacl_irt_clock_gettime = nacl_irt_clock_gettime; |
553 } | 603 } |
554 | 604 |
555 if (!__nacl_irt_query) | 605 if (!__nacl_irt_query) |
556 __nacl_irt_query = no_interface; | 606 __nacl_irt_query = no_interface; |
557 | 607 |
558 __nacl_irt_mkdir = not_implemented; | 608 __nacl_irt_mkdir = not_implemented; |
559 __nacl_irt_chdir = not_implemented; | 609 __nacl_irt_chdir = not_implemented; |
560 __nacl_irt_rmdir = not_implemented; | 610 __nacl_irt_rmdir = not_implemented; |
561 __nacl_irt_getcwd = not_implemented; | 611 __nacl_irt_getcwd = not_implemented; |
| 612 |
| 613 __nacl_irt_epoll_create = not_implemented; |
| 614 __nacl_irt_epoll_create1 = not_implemented; |
| 615 __nacl_irt_epoll_ctl = not_implemented; |
| 616 __nacl_irt_epoll_pwait = not_implemented; |
| 617 __nacl_irt_epoll_wait = not_implemented; |
| 618 __nacl_irt_poll = not_implemented; |
| 619 __nacl_irt_ppoll = not_implemented; |
| 620 __nacl_irt_socket = not_implemented; |
| 621 __nacl_irt_accept = not_implemented; |
| 622 __nacl_irt_bind = not_implemented; |
| 623 __nacl_irt_listen = not_implemented; |
| 624 __nacl_irt_connect = not_implemented; |
| 625 __nacl_irt_send = not_implemented; |
| 626 __nacl_irt_sendmsg = not_implemented; |
| 627 __nacl_irt_sendto = not_implemented; |
| 628 __nacl_irt_recv = not_implemented; |
| 629 __nacl_irt_recvmsg = not_implemented; |
| 630 __nacl_irt_recvfrom = not_implemented; |
| 631 __nacl_irt_select = not_implemented; |
| 632 __nacl_irt_pselect = not_implemented; |
| 633 __nacl_irt_getpeername = not_implemented; |
| 634 __nacl_irt_getsockname = not_implemented; |
| 635 __nacl_irt_getsockopt = not_implemented; |
| 636 __nacl_irt_setsockopt = not_implemented; |
| 637 __nacl_irt_socketpair = not_implemented; |
| 638 __nacl_irt_shutdown = not_implemented; |
562 } | 639 } |
563 | 640 |
564 size_t nacl_interface_query(const char *interface_ident, | 641 size_t nacl_interface_query(const char *interface_ident, |
565 void *table, size_t tablesize) { | 642 void *table, size_t tablesize) { |
566 return (*__nacl_irt_query)(interface_ident, table, tablesize); | 643 return (*__nacl_irt_query)(interface_ident, table, tablesize); |
567 } | 644 } |
OLD | NEW |