Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Side by Side Diff: sysdeps/nacl/irt_syscalls.h

Issue 10134022: fix tests and return new syscalls back (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: fixed description Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « make_sysd_rules.py ('k') | sysdeps/nacl/irt_syscalls.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <sys/select.h>
7 #include <poll.h>
5 #include <stddef.h> 8 #include <stddef.h>
6 #include <fcntl.h> 9 #include <fcntl.h>
7 #include <time.h> 10 #include <time.h>
8 11
9 #include <nacl_stat.h> 12 #include <nacl_stat.h>
10 13
11 struct dirent; 14 struct dirent;
12 struct nacl_abi_stat; 15 struct nacl_abi_stat;
13 struct timeval; 16 struct timeval;
14 struct timespec; 17 struct timespec;
18 struct sockaddr;
19 struct msghdr;
20
21 #define socklen_t unsigned int
15 22
16 extern size_t (*__nacl_irt_query)(const char *interface_ident, 23 extern size_t (*__nacl_irt_query)(const char *interface_ident,
17 void *table, size_t tablesize); 24 void *table, size_t tablesize);
18 25
19 extern void (*__nacl_irt_exit) (int status); 26 extern void (*__nacl_irt_exit) (int status);
20 extern int (*__nacl_irt_gettod) (struct timeval *tv); 27 extern int (*__nacl_irt_gettod) (struct timeval *tv);
21 extern int (*__nacl_irt_clock) (clock_t *ticks); 28 extern int (*__nacl_irt_clock) (clock_t *ticks);
22 extern int (*__nacl_irt_nanosleep) (const struct timespec *req, 29 extern int (*__nacl_irt_nanosleep) (const struct timespec *req,
23 struct timespec *rem); 30 struct timespec *rem);
24 extern int (*__nacl_irt_sched_yield) (void); 31 extern int (*__nacl_irt_sched_yield) (void);
25 extern int (*__nacl_irt_sysconf) (int name, int *value); 32 extern int (*__nacl_irt_sysconf) (int name, int *value);
26 33
34 extern int (*__nacl_irt_mkdir) (const char* pathname, mode_t mode);
35 extern int (*__nacl_irt_rmdir) (const char* pathname);
36 extern int (*__nacl_irt_chdir) (const char* pathname);
37 extern int (*__nacl_irt_getcwd) (char* buf, size_t size, int *len);
38
39 extern int (*__nacl_irt_epoll_create) (int size, int *fd);
40 extern int (*__nacl_irt_epoll_create1) (int flags, int *fd);
41 extern int (*__nacl_irt_epoll_ctl) (int epfd, int op, int fd,
42 struct epoll_event *event);
43 extern int (*__nacl_irt_epoll_pwait) (int epfd, struct epoll_event *events,
44 int maxevents, int timeout, const sigset_t *sigmask,
45 size_t sigset_size, int *count);
46 extern int (*__nacl_irt_epoll_wait) (int epfd, struct epoll_event *events,
47 int maxevents, int timeout, int *count);
48 extern int (*__nacl_irt_poll) (struct pollfd *fds, nfds_t nfds,
49 int timeout, int *count);
50 extern int (*__nacl_irt_ppoll) (struct pollfd *fds, nfds_t nfds,
51 const struct timespec *timeout, const sigset_t *sigmask,
52 size_t sigset_size, int *count);
53 extern int (*__nacl_irt_socket) (int domain, int type, int protocol, int *sd);
54 extern int (*__nacl_irt_accept) (int sockfd, struct sockaddr *addr,
55 socklen_t *addrlen, int *sd);
56 extern int (*__nacl_irt_bind) (int sockfd, const struct sockaddr *addr,
57 socklen_t addrlen);
58 extern int (*__nacl_irt_listen) (int sockfd, int backlog);
59 extern int (*__nacl_irt_connect) (int sockfd, const struct sockaddr *addr,
60 socklen_t addrlen);
61 extern int (*__nacl_irt_send) (int sockfd, const void *buf, size_t len,
62 int flags, int *count);
63 extern int (*__nacl_irt_sendmsg) (int sockfd, const struct msghdr *msg,
64 int flags, int *count);
65 extern int (*__nacl_irt_sendto) (int sockfd, const void *buf, size_t len,
66 int flags, const struct sockaddr *dest_addr, socklen_t addrlen,
67 int *count);
68 extern int (*__nacl_irt_recv) (int sockfd, void *buf, size_t len, int flags,
69 int *count);
70 extern int (*__nacl_irt_recvmsg) (int sockfd, struct msghdr *msg,
71 int flags, int *count);
72 extern int (*__nacl_irt_recvfrom) (int sockfd, void *buf, size_t len, int flags,
73 struct sockaddr *dest_addr, socklen_t* addrlen, int *count);
74 extern int (*__nacl_irt_select) (int nfds, fd_set *readfds,
75 fd_set *writefds, fd_set *exceptfds,
76 const struct timeval *timeout, int *count);
77 extern int (*__nacl_irt_pselect) (int nfds, fd_set *readfds,
78 fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout,
79 void* sigmask, int *count);
80 extern int (*__nacl_irt_getpeername) (int sockfd, struct sockaddr *addr,
81 socklen_t *addrlen);
82 extern int (*__nacl_irt_getsockname) (int sockfd, struct sockaddr *addr,
83 socklen_t *addrlen);
84 extern int (*__nacl_irt_getsockopt) (int sockfd, int level, int optname,
85 void *optval, socklen_t *optlen);
86 extern int (*__nacl_irt_setsockopt) (int sockfd, int level, int optname,
87 const void *optval, socklen_t optlen);
88 extern int (*__nacl_irt_socketpair) (int domain, int type, int protocol,
89 int sv[2]);
90 extern int (*__nacl_irt_shutdown) (int sockfd, int how);
91
92
27 extern int (*__nacl_irt_open) (const char *pathname, int oflag, mode_t cmode, 93 extern int (*__nacl_irt_open) (const char *pathname, int oflag, mode_t cmode,
28 int *newfd); 94 int *newfd);
29 extern int (*__nacl_irt_close) (int fd); 95 extern int (*__nacl_irt_close) (int fd);
30 extern int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread); 96 extern int (*__nacl_irt_read) (int fd, void *buf, size_t count, size_t *nread);
31 extern int (*__nacl_irt_write) (int fd, const void *buf, size_t count, 97 extern int (*__nacl_irt_write) (int fd, const void *buf, size_t count,
32 size_t *nwrote); 98 size_t *nwrote);
33 extern int (*__nacl_irt_seek) (int fd, nacl_abi_off_t offset, int whence, 99 extern int (*__nacl_irt_seek) (int fd, nacl_abi_off_t offset, int whence,
34 nacl_abi_off_t *new_offset); 100 nacl_abi_off_t *new_offset);
35 extern int (*__nacl_irt_dup) (int fd, int *newfd); 101 extern int (*__nacl_irt_dup) (int fd, int *newfd);
36 extern int (*__nacl_irt_dup2) (int fd, int newfd); 102 extern int (*__nacl_irt_dup2) (int fd, int newfd);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 extern int (*__nacl_irt_cond_timed_wait_abs) (int cond_handle, int mutex_handle, 135 extern int (*__nacl_irt_cond_timed_wait_abs) (int cond_handle, int mutex_handle,
70 const struct timespec *abstime); 136 const struct timespec *abstime);
71 137
72 extern int (*__nacl_irt_tls_init) (void *tdb); 138 extern int (*__nacl_irt_tls_init) (void *tdb);
73 extern void *(*__nacl_irt_tls_get) (void); 139 extern void *(*__nacl_irt_tls_get) (void);
74 140
75 extern int (*__nacl_irt_open_resource) (const char* file, int *fd); 141 extern int (*__nacl_irt_open_resource) (const char* file, int *fd);
76 142
77 extern int (*__nacl_irt_clock_getres) (clockid_t clk_id, struct timespec *res); 143 extern int (*__nacl_irt_clock_getres) (clockid_t clk_id, struct timespec *res);
78 extern int (*__nacl_irt_clock_gettime) (clockid_t clk_id, struct timespec *tp); 144 extern int (*__nacl_irt_clock_gettime) (clockid_t clk_id, struct timespec *tp);
145 #undef socklen_t
79 146
80 #ifdef _LIBC 147 #ifdef _LIBC
81 void init_irt_table (void) attribute_hidden; 148 void init_irt_table (void) attribute_hidden;
82 #endif 149 #endif
83 #endif 150 #endif
84 151
85 #if defined(_LIBC) || defined (__need_emulated_syscalls) 152 #if defined(_LIBC) || defined (__need_emulated_syscalls)
86 #ifndef _IRT_EMULATED_SYSCALLS_H 153 #ifndef _IRT_EMULATED_SYSCALLS_H
87 #define _IRT_EMULATED_SYSCALLS_H 1 154 #define _IRT_EMULATED_SYSCALLS_H 1
88 155
(...skipping 14 matching lines...) Expand all
103 #include <mqueue.h> 170 #include <mqueue.h>
104 #endif 171 #endif
105 #include <pthread.h> 172 #include <pthread.h>
106 #include <sched.h> 173 #include <sched.h>
107 #include <signal.h> 174 #include <signal.h>
108 #include <streams/stropts.h> 175 #include <streams/stropts.h>
109 #include <sys/epoll.h> 176 #include <sys/epoll.h>
110 #include <sys/poll.h> 177 #include <sys/poll.h>
111 #include <sys/ptrace.h> 178 #include <sys/ptrace.h>
112 #include <sys/times.h> 179 #include <sys/times.h>
113 #include <sys/types.h>
114 #include <sys/wait.h> 180 #include <sys/wait.h>
115 #include <time.h> 181 #include <time.h>
116 #include <utime.h> 182 #include <utime.h>
117 #include <sys/msg.h> 183 #include <sys/msg.h>
118 #include <sys/sem.h> 184 #include <sys/sem.h>
119 #include <sys/shm.h> 185 #include <sys/shm.h>
120 #include <sys/sysinfo.h> 186 #include <sys/sysinfo.h>
121 #include <sys/time.h> 187 #include <sys/time.h>
122 #include <sys/timex.h> 188 #include <sys/timex.h>
123 #include <sys/types.h> 189 #include <sys/types.h>
124 #include <sys/utsname.h> 190 #include <sys/utsname.h>
125 #ifdef __i386__ 191 #ifdef __i386__
126 #include <sys/vm86.h> 192 #include <sys/vm86.h>
127 #endif 193 #endif
128 #include <unistd.h> 194 #include <unistd.h>
129 195
130 #ifdef _LIBC 196 #ifdef _LIBC
131 struct robust_list_head; 197 struct robust_list_head;
132 #else 198 #else
133 struct robust_list_head 199 struct robust_list_head
134 { 200 {
135 void *list; 201 void *list;
136 long int futex_offset; 202 long int futex_offset;
137 void *list_op_pending; 203 void *list_op_pending;
138 }; 204 };
139 #endif 205 #endif
140 206
141 #endif 207 #endif
142 #endif 208 #endif
OLDNEW
« no previous file with comments | « make_sysd_rules.py ('k') | sysdeps/nacl/irt_syscalls.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698