OLD | NEW |
---|---|
1 #ifndef _IRT_SYSCALLS_H | 1 #ifndef _IRT_SYSCALLS_H |
2 #define _IRT_SYSCALLS_H | 2 #define _IRT_SYSCALLS_H |
3 | 3 |
4 #include <sys/types.h> | 4 #include <sys/types.h> |
5 #include <sys/epoll.h> | |
6 #include <poll.h> | |
5 #include <stddef.h> | 7 #include <stddef.h> |
6 #include <fcntl.h> | 8 #include <fcntl.h> |
7 #include <time.h> | 9 #include <time.h> |
8 | 10 |
9 #include <nacl_stat.h> | 11 #include <nacl_stat.h> |
10 | 12 |
11 struct dirent; | 13 struct dirent; |
12 struct nacl_abi_stat; | 14 struct nacl_abi_stat; |
13 struct timeval; | 15 struct timeval; |
14 struct timespec; | 16 struct timespec; |
17 struct sockaddr; | |
18 struct msghdr; | |
19 | |
20 #define socklen_t unsigned int | |
15 | 21 |
16 extern size_t (*__nacl_irt_query)(const char *interface_ident, | 22 extern size_t (*__nacl_irt_query)(const char *interface_ident, |
17 void *table, size_t tablesize); | 23 void *table, size_t tablesize); |
18 | 24 |
19 extern void (*__nacl_irt_exit) (int status); | 25 extern void (*__nacl_irt_exit) (int status); |
20 extern int (*__nacl_irt_gettod) (struct timeval *tv); | 26 extern int (*__nacl_irt_gettod) (struct timeval *tv); |
21 extern int (*__nacl_irt_clock) (clock_t *ticks); | 27 extern int (*__nacl_irt_clock) (clock_t *ticks); |
22 extern int (*__nacl_irt_nanosleep) (const struct timespec *req, | 28 extern int (*__nacl_irt_nanosleep) (const struct timespec *req, |
23 struct timespec *rem); | 29 struct timespec *rem); |
24 extern int (*__nacl_irt_sched_yield) (void); | 30 extern int (*__nacl_irt_sched_yield) (void); |
25 extern int (*__nacl_irt_sysconf) (int name, int *value); | 31 extern int (*__nacl_irt_sysconf) (int name, int *value); |
26 | 32 |
27 extern int (*__nacl_irt_mkdir) (const char* pathname, mode_t mode); | 33 extern int (*__nacl_irt_mkdir) (const char* pathname, mode_t mode); |
28 extern int (*__nacl_irt_rmdir) (const char* pathname); | 34 extern int (*__nacl_irt_rmdir) (const char* pathname); |
29 extern int (*__nacl_irt_chdir) (const char* pathname); | 35 extern int (*__nacl_irt_chdir) (const char* pathname); |
30 extern int (*__nacl_irt_getcwd) (char* buf, size_t size, int* ret); | 36 extern int (*__nacl_irt_getcwd) (char* buf, size_t size, int* ret); |
31 | 37 |
38 extern int (*__nacl_irt_epoll_create) (int flags); // size | |
39 extern int (*__nacl_irt_epoll_create1 )(int flags); | |
40 extern int (*__nacl_irt_epoll_ctl) (int epfd, int op, int fd, | |
41 struct epoll_event *event); | |
42 extern int (*__nacl_irt_epoll_pwait) (int epfd, struct epoll_event *events, | |
43 int maxevents, int timeout, | |
44 const sigset_t *sigmask, size_t sigset_size); | |
45 extern int (*__nacl_irt_epoll_wait) (int epfd, struct epoll_event *events, | |
46 int maxevents, int timeout); | |
47 extern int (*__nacl_irt_poll) (struct pollfd *fds, nfds_t nfds, | |
48 int timeout); | |
49 extern int (*__nacl_irt_ppoll) (struct pollfd *fds, nfds_t nfds, | |
50 const struct timespec *timeout, | |
51 const sigset_t *sigmask, size_t sigset_size); | |
52 extern int (*__nacl_irt_socket) (int domain, int type, int protocol); | |
53 extern int (*__nacl_irt_accept) (int sockfd, struct sockaddr *addr, | |
54 socklen_t *addrlen); | |
55 extern int (*__nacl_irt_bind) (int sockfd, const struct sockaddr *addr, | |
56 socklen_t addrlen); | |
57 extern int (*__nacl_irt_listen) (int sockfd, int backlog); | |
58 extern int (*__nacl_irt_connect) (int sockfd, const struct sockaddr *addr, | |
59 socklen_t addrlen); | |
60 extern int (*__nacl_irt_send) (int sockfd, const void *buf, size_t len, | |
61 int flags, int* ret); | |
62 extern int (*__nacl_irt_sendmsg) (int sockfd, const struct msghdr *msg, | |
63 int flags, int* ret); | |
64 extern int (*__nacl_irt_sendto) (int sockfd, const void *buf, size_t len, | |
65 int flags, const struct sockaddr *dest_addr, | |
66 socklen_t addrlen, int* ret); | |
67 extern int (*__nacl_irt_recv) (int sockfd, void *buf, size_t len, int flags, int * ret); | |
Evgeniy Stepanov
2012/04/13 11:49:35
80 chars here and below
khim
2012/04/13 11:56:48
On 2012/04/13 11:49:35, Evgeniy Stepanov wrote:
>
| |
68 extern int (*__nacl_irt_recvmsg) (int sockfd, struct msghdr *msg, | |
69 int flags, int* ret); | |
70 extern int (*__nacl_irt_recvfrom) (int sockfd, void *buf, size_t len, int flags, | |
71 struct sockaddr *dest_addr, socklen_t* addrlen, int* ret); | |
72 extern int (*__nacl_irt_select) (int nfds, fd_set *readfds, | |
73 fd_set *writefds, fd_set *exceptfds, | |
74 const struct timeval *timeout); | |
75 extern int (*__nacl_irt_pselect) (int nfds, fd_set *readfds, | |
76 fd_set *writefds, fd_set *exceptfds, | |
77 const struct timeval *timeout, void* sigmask); | |
78 extern int (*__nacl_irt_getpeername) (int sockfd, struct sockaddr *addr, | |
79 socklen_t *addrlen); | |
80 extern int (*__nacl_irt_getsockname) (int sockfd, struct sockaddr *addr, | |
81 socklen_t *addrlen); | |
82 extern int (*__nacl_irt_getsockopt) (int sockfd, int level, int optname, | |
83 void *optval, socklen_t *optlen); | |
84 extern int (*__nacl_irt_setsockopt) (int sockfd, int level, int optname, | |
85 const void *optval, socklen_t optlen); | |
86 extern int (*__nacl_irt_socketpair) (int domain, int type, int protocol, int sv[ 2]); | |
87 extern int (*__nacl_irt_shutdown) (int sockfd, int how); | |
88 | |
89 | |
32 extern int (*__nacl_irt_open) (const char *pathname, int oflag, mode_t cmode, | 90 extern int (*__nacl_irt_open) (const char *pathname, int oflag, mode_t cmode, |
33 int *newfd); | 91 int *newfd); |
34 extern int (*__nacl_irt_close) (int fd); | 92 extern int (*__nacl_irt_close) (int fd); |
35 extern int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread); | 93 extern int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread); |
36 extern int (*__nacl_irt_write) (int fd, const void *buf, size_t count, | 94 extern int (*__nacl_irt_write) (int fd, const void *buf, size_t count, |
37 size_t *nwrote); | 95 size_t *nwrote); |
38 extern int (*__nacl_irt_seek) (int fd, nacl_abi_off_t offset, int whence, | 96 extern int (*__nacl_irt_seek) (int fd, nacl_abi_off_t offset, int whence, |
39 nacl_abi_off_t *new_offset); | 97 nacl_abi_off_t *new_offset); |
40 extern int (*__nacl_irt_dup) (int fd, int *newfd); | 98 extern int (*__nacl_irt_dup) (int fd, int *newfd); |
41 extern int (*__nacl_irt_dup2) (int fd, int newfd); | 99 extern int (*__nacl_irt_dup2) (int fd, int newfd); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 extern int (*__nacl_irt_cond_timed_wait_abs) (int cond_handle, int mutex_handle, | 132 extern int (*__nacl_irt_cond_timed_wait_abs) (int cond_handle, int mutex_handle, |
75 const struct timespec *abstime); | 133 const struct timespec *abstime); |
76 | 134 |
77 extern int (*__nacl_irt_tls_init) (void *tdb); | 135 extern int (*__nacl_irt_tls_init) (void *tdb); |
78 extern void *(*__nacl_irt_tls_get) (void); | 136 extern void *(*__nacl_irt_tls_get) (void); |
79 | 137 |
80 extern int (*__nacl_irt_open_resource) (const char* file, int *fd); | 138 extern int (*__nacl_irt_open_resource) (const char* file, int *fd); |
81 | 139 |
82 extern int (*__nacl_irt_clock_getres) (clockid_t clk_id, struct timespec *res); | 140 extern int (*__nacl_irt_clock_getres) (clockid_t clk_id, struct timespec *res); |
83 extern int (*__nacl_irt_clock_gettime) (clockid_t clk_id, struct timespec *tp); | 141 extern int (*__nacl_irt_clock_gettime) (clockid_t clk_id, struct timespec *tp); |
142 #undef socklen_t | |
84 | 143 |
85 #ifdef _LIBC | 144 #ifdef _LIBC |
86 void init_irt_table (void) attribute_hidden; | 145 void init_irt_table (void) attribute_hidden; |
87 #endif | 146 #endif |
88 #endif | 147 #endif |
89 | 148 |
90 #if defined(_LIBC) || defined (__need_emulated_syscalls) | 149 #if defined(_LIBC) || defined (__need_emulated_syscalls) |
91 #ifndef _IRT_EMULATED_SYSCALLS_H | 150 #ifndef _IRT_EMULATED_SYSCALLS_H |
92 #define _IRT_EMULATED_SYSCALLS_H 1 | 151 #define _IRT_EMULATED_SYSCALLS_H 1 |
93 | 152 |
(...skipping 14 matching lines...) Expand all Loading... | |
108 #include <mqueue.h> | 167 #include <mqueue.h> |
109 #endif | 168 #endif |
110 #include <pthread.h> | 169 #include <pthread.h> |
111 #include <sched.h> | 170 #include <sched.h> |
112 #include <signal.h> | 171 #include <signal.h> |
113 #include <streams/stropts.h> | 172 #include <streams/stropts.h> |
114 #include <sys/epoll.h> | 173 #include <sys/epoll.h> |
115 #include <sys/poll.h> | 174 #include <sys/poll.h> |
116 #include <sys/ptrace.h> | 175 #include <sys/ptrace.h> |
117 #include <sys/times.h> | 176 #include <sys/times.h> |
118 #include <sys/types.h> | |
119 #include <sys/wait.h> | 177 #include <sys/wait.h> |
120 #include <time.h> | 178 #include <time.h> |
121 #include <utime.h> | 179 #include <utime.h> |
122 #include <sys/msg.h> | 180 #include <sys/msg.h> |
123 #include <sys/sem.h> | 181 #include <sys/sem.h> |
124 #include <sys/shm.h> | 182 #include <sys/shm.h> |
125 #include <sys/sysinfo.h> | 183 #include <sys/sysinfo.h> |
126 #include <sys/time.h> | 184 #include <sys/time.h> |
127 #include <sys/timex.h> | 185 #include <sys/timex.h> |
128 #include <sys/types.h> | 186 #include <sys/types.h> |
129 #include <sys/utsname.h> | 187 #include <sys/utsname.h> |
130 #ifdef __i386__ | 188 #ifdef __i386__ |
131 #include <sys/vm86.h> | 189 #include <sys/vm86.h> |
132 #endif | 190 #endif |
133 #include <unistd.h> | 191 #include <unistd.h> |
134 | 192 |
135 #ifdef _LIBC | 193 #ifdef _LIBC |
136 struct robust_list_head; | 194 struct robust_list_head; |
137 #else | 195 #else |
138 struct robust_list_head | 196 struct robust_list_head |
139 { | 197 { |
140 void *list; | 198 void *list; |
141 long int futex_offset; | 199 long int futex_offset; |
142 void *list_op_pending; | 200 void *list_op_pending; |
143 }; | 201 }; |
144 #endif | 202 #endif |
145 | 203 |
146 #endif | 204 #endif |
147 #endif | 205 #endif |
OLD | NEW |