| OLD | NEW |
| 1 #ifndef _NACL_SYSDEP_H | 1 #ifndef _NACL_SYSDEP_H |
| 2 #define _NACL_SYSDEP_H 1 | 2 #define _NACL_SYSDEP_H 1 |
| 3 | 3 |
| 4 #if !defined(__ASSEMBLER__) | 4 #if !defined(__ASSEMBLER__) |
| 5 #include <futex_emulation.h> | 5 #include <futex_emulation.h> |
| 6 #include <irt_syscalls.h> | 6 #include <irt_syscalls.h> |
| 7 #include <lowlevellock.h> | 7 #include <lowlevellock.h> |
| 8 | 8 |
| 9 /* Implementation of all syscalls for use in platform- and OS- independent code | 9 /* Implementation of all syscalls for use in platform- and OS- independent code |
| 10 as inline functions. Each function translates the syscall arguments into IRT | 10 as inline functions. Each function translates the syscall arguments into IRT |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 INTERNAL_SYSCALL_capset_2 (int *err, struct __user_cap_header_struct *hdrp, | 107 INTERNAL_SYSCALL_capset_2 (int *err, struct __user_cap_header_struct *hdrp, |
| 108 const struct __user_cap_data_struct *datap) | 108 const struct __user_cap_data_struct *datap) |
| 109 { | 109 { |
| 110 *err = (38 /* ENOSYS */); | 110 *err = (38 /* ENOSYS */); |
| 111 return 0; | 111 return 0; |
| 112 } | 112 } |
| 113 | 113 |
| 114 __extern_always_inline int | 114 __extern_always_inline int |
| 115 INTERNAL_SYSCALL_chdir_1 (int *err, const char *path) | 115 INTERNAL_SYSCALL_chdir_1 (int *err, const char *path) |
| 116 { | 116 { |
| 117 *err = __nacl_irt_chdir (path); | 117 *err = (38 /* ENOSYS */); |
| 118 return 0; | 118 return 0; |
| 119 } | 119 } |
| 120 | 120 |
| 121 __extern_always_inline int | 121 __extern_always_inline int |
| 122 INTERNAL_SYSCALL_chmod_2 (int *err, const char *path, mode_t mode) | 122 INTERNAL_SYSCALL_chmod_2 (int *err, const char *path, mode_t mode) |
| 123 { | 123 { |
| 124 *err = (38 /* ENOSYS */); | 124 *err = (38 /* ENOSYS */); |
| 125 return 0; | 125 return 0; |
| 126 } | 126 } |
| 127 | 127 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 231 } |
| 232 | 232 |
| 233 __extern_always_inline int | 233 __extern_always_inline int |
| 234 INTERNAL_SYSCALL_dup3_3 (int *err, int oldfd, int newfd, int flags) | 234 INTERNAL_SYSCALL_dup3_3 (int *err, int oldfd, int newfd, int flags) |
| 235 { | 235 { |
| 236 *err = (38 /* ENOSYS */); | 236 *err = (38 /* ENOSYS */); |
| 237 return 0; | 237 return 0; |
| 238 } | 238 } |
| 239 | 239 |
| 240 __extern_always_inline int | 240 __extern_always_inline int |
| 241 INTERNAL_SYSCALL_epoll_create_1 (int *err, int size) | 241 INTERNAL_SYSCALL_epoll_create_1 (int *err, int flags) |
| 242 { | 242 { |
| 243 int fd; | 243 *err = (38 /* ENOSYS */); |
| 244 *err = __nacl_irt_epoll_create (size, &fd); | 244 return 0; |
| 245 return fd; | |
| 246 } | 245 } |
| 247 | 246 |
| 248 __extern_always_inline int | 247 __extern_always_inline int |
| 249 INTERNAL_SYSCALL_epoll_create1_1 (int *err, int flags) | 248 INTERNAL_SYSCALL_epoll_create1_1 (int *err, int flags) |
| 250 { | 249 { |
| 251 int fd; | 250 *err = (38 /* ENOSYS */); |
| 252 *err = __nacl_irt_epoll_create1 (flags, &fd); | 251 return 0; |
| 253 return fd; | |
| 254 } | 252 } |
| 255 | 253 |
| 256 __extern_always_inline int | 254 __extern_always_inline int |
| 257 INTERNAL_SYSCALL_epoll_ctl_4 (int *err, int epfd, int op, int fd, | 255 INTERNAL_SYSCALL_epoll_ctl_4 (int *err, int epfd, int op, int fd, |
| 258 struct epoll_event *event) | 256 struct epoll_event *event) |
| 259 { | 257 { |
| 260 *err = __nacl_irt_epoll_ctl (epfd, op, fd, event); | 258 *err = (38 /* ENOSYS */); |
| 261 return 0; | 259 return 0; |
| 262 } | 260 } |
| 263 | 261 |
| 264 __extern_always_inline int | 262 __extern_always_inline int |
| 265 INTERNAL_SYSCALL_epoll_pwait_6 (int *err, int epfd, struct epoll_event *events, | 263 INTERNAL_SYSCALL_epoll_pwait_6 (int *err, int epfd, struct epoll_event *events, |
| 266 int maxevents, int timeout, | 264 int maxevents, int timeout, |
| 267 » » » » const sigset_t *sigmask, size_t sigset_size) | 265 » » » » const sigset_t *sigmask, size_t sigsetsize) |
| 268 { | 266 { |
| 269 int count; | 267 *err = (38 /* ENOSYS */); |
| 270 *err = __nacl_irt_epoll_pwait (epfd, events, maxevents, timeout, sigmask, | 268 return 0; |
| 271 sigset_size, &count); | |
| 272 return count; | |
| 273 } | 269 } |
| 274 | 270 |
| 275 __extern_always_inline int | 271 __extern_always_inline int |
| 276 INTERNAL_SYSCALL_execve_3 (int *err, const char *filename, char *const argv[], | 272 INTERNAL_SYSCALL_execve_3 (int *err, const char *filename, char *const argv[], |
| 277 char *const envp[]) | 273 char *const envp[]) |
| 278 { | 274 { |
| 279 *err = (38 /* ENOSYS */); | 275 *err = (38 /* ENOSYS */); |
| 280 return 0; | 276 return 0; |
| 281 } | 277 } |
| 282 | 278 |
| 283 __extern_always_inline int | 279 __extern_always_inline int |
| 284 INTERNAL_SYSCALL_epoll_wait_4 (int *err, int epfd, struct epoll_event *events, | 280 INTERNAL_SYSCALL_epoll_wait_4 (int *err, int epfd, struct epoll_event *events, |
| 285 int maxevents, int timeout) | 281 int maxevents, int timeout) |
| 286 { | 282 { |
| 287 int count; | 283 *err = (38 /* ENOSYS */); |
| 288 *err = __nacl_irt_epoll_wait (epfd, events, maxevents, timeout, &count); | 284 return 0; |
| 289 return count; | |
| 290 } | 285 } |
| 291 | 286 |
| 292 __extern_always_inline int | 287 __extern_always_inline int |
| 293 INTERNAL_SYSCALL_eventfd2_2 (int *err, unsigned int initval, int flags) | 288 INTERNAL_SYSCALL_eventfd2_2 (int *err, unsigned int initval, int flags) |
| 294 { | 289 { |
| 295 *err = (38 /* ENOSYS */); | 290 *err = (38 /* ENOSYS */); |
| 296 return 0; | 291 return 0; |
| 297 } | 292 } |
| 298 | 293 |
| 299 __extern_always_inline int | 294 __extern_always_inline int |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 return 0; | 581 return 0; |
| 587 } | 582 } |
| 588 | 583 |
| 589 /* NOTE! The user-level library version returns a character pointer. | 584 /* NOTE! The user-level library version returns a character pointer. |
| 590 | 585 |
| 591 The system call just returns the length of the buffer filled (which includes | 586 The system call just returns the length of the buffer filled (which includes |
| 592 the ending '\0' character), or zero in case of error. */ | 587 the ending '\0' character), or zero in case of error. */ |
| 593 __extern_always_inline int | 588 __extern_always_inline int |
| 594 INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size) | 589 INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size) |
| 595 { | 590 { |
| 596 int len; | 591 *err = (38 /* ENOSYS */); |
| 597 *err = __nacl_irt_getcwd (buf, size, &len); | 592 return 0; |
| 598 return len; | |
| 599 } | 593 } |
| 600 | 594 |
| 601 __extern_always_inline gid_t | 595 __extern_always_inline gid_t |
| 602 INTERNAL_SYSCALL_getegid_0 (int *err) | 596 INTERNAL_SYSCALL_getegid_0 (int *err) |
| 603 { | 597 { |
| 604 *err = (38 /* ENOSYS */); | 598 *err = (38 /* ENOSYS */); |
| 605 return 0; | 599 return 0; |
| 606 } | 600 } |
| 607 | 601 |
| 608 __extern_always_inline uid_t | 602 __extern_always_inline uid_t |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 INTERNAL_SYSCALL_mincore_3 (int *err, void *addr, size_t length, | 908 INTERNAL_SYSCALL_mincore_3 (int *err, void *addr, size_t length, |
| 915 unsigned char *vec) | 909 unsigned char *vec) |
| 916 { | 910 { |
| 917 *err = (38 /* ENOSYS */); | 911 *err = (38 /* ENOSYS */); |
| 918 return 0; | 912 return 0; |
| 919 } | 913 } |
| 920 | 914 |
| 921 __extern_always_inline int | 915 __extern_always_inline int |
| 922 INTERNAL_SYSCALL_mkdir_2 (int *err, const char *pathname, mode_t mode) | 916 INTERNAL_SYSCALL_mkdir_2 (int *err, const char *pathname, mode_t mode) |
| 923 { | 917 { |
| 924 *err = __nacl_irt_mkdir (pathname, mode); | 918 *err = (38 /* ENOSYS */); |
| 925 return 0; | 919 return 0; |
| 926 } | 920 } |
| 927 | 921 |
| 928 __extern_always_inline int | 922 __extern_always_inline int |
| 929 INTERNAL_SYSCALL_mkdirat_3 (int *err, int dirfd, const char *pathname, | 923 INTERNAL_SYSCALL_mkdirat_3 (int *err, int dirfd, const char *pathname, |
| 930 mode_t mode) | 924 mode_t mode) |
| 931 { | 925 { |
| 932 *err = (38 /* ENOSYS */); | 926 *err = (38 /* ENOSYS */); |
| 933 return 0; | 927 return 0; |
| 934 } | 928 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1162 INTERNAL_SYSCALL_pivot_root_2 (int *err, const char *new_root, | 1156 INTERNAL_SYSCALL_pivot_root_2 (int *err, const char *new_root, |
| 1163 const char *put_old) | 1157 const char *put_old) |
| 1164 { | 1158 { |
| 1165 *err = (38 /* ENOSYS */); | 1159 *err = (38 /* ENOSYS */); |
| 1166 return 0; | 1160 return 0; |
| 1167 } | 1161 } |
| 1168 | 1162 |
| 1169 __extern_always_inline int | 1163 __extern_always_inline int |
| 1170 INTERNAL_SYSCALL_poll_3 (int *err, struct pollfd *fds, nfds_t nfds, int timeout) | 1164 INTERNAL_SYSCALL_poll_3 (int *err, struct pollfd *fds, nfds_t nfds, int timeout) |
| 1171 { | 1165 { |
| 1172 int count; | 1166 *err = (38 /* ENOSYS */); |
| 1173 *err = __nacl_irt_poll (fds, nfds, timeout, &count); | 1167 return 0; |
| 1174 return count; | |
| 1175 } | 1168 } |
| 1176 | 1169 |
| 1177 __extern_always_inline int | 1170 __extern_always_inline int |
| 1178 INTERNAL_SYSCALL_ppoll_5 (int *err, struct pollfd *fds, nfds_t nfds, | 1171 INTERNAL_SYSCALL_ppoll_5 (int *err, struct pollfd *fds, nfds_t nfds, |
| 1179 const struct timespec *timeout, | 1172 const struct timespec *timeout, |
| 1180 » » » const sigset_t *sigmask, size_t sigset_size) | 1173 » » » const sigset_t *sigmask, size_t sigsetsize) |
| 1181 { | 1174 { |
| 1182 int count; | 1175 *err = (38 /* ENOSYS */); |
| 1183 *err = __nacl_irt_ppoll (fds, nfds, timeout, sigmask, sigset_size, &count); | 1176 return 0; |
| 1184 return count; | |
| 1185 } | 1177 } |
| 1186 | 1178 |
| 1187 __extern_always_inline int | 1179 __extern_always_inline int |
| 1188 INTERNAL_SYSCALL_prctl_5 (int *err, int option, unsigned long arg2, | 1180 INTERNAL_SYSCALL_prctl_5 (int *err, int option, unsigned long arg2, |
| 1189 unsigned long arg3, unsigned long arg4, | 1181 unsigned long arg3, unsigned long arg4, |
| 1190 unsigned long arg5) | 1182 unsigned long arg5) |
| 1191 { | 1183 { |
| 1192 *err = (38 /* ENOSYS */); | 1184 *err = (38 /* ENOSYS */); |
| 1193 return 0; | 1185 return 0; |
| 1194 } | 1186 } |
| 1195 | 1187 |
| 1196 __extern_always_inline int | 1188 __extern_always_inline int |
| 1197 INTERNAL_SYSCALL_pselect6_6 (int *err, int nfds, fd_set *readfds, | 1189 INTERNAL_SYSCALL_pselect6_6 (int *err, int nfds, fd_set *readfds, |
| 1198 fd_set *writefds, fd_set *exceptfds, | 1190 » » » fd_set *writefds, fd_set *exceptfds, |
| 1199 const struct timeval *timeout, | 1191 » » » const struct timespec *timeout, |
| 1200 void *sigmask) | 1192 » » » void *sigmask) |
| 1201 { | 1193 { |
| 1202 int count; | 1194 *err = (38 /* ENOSYS */); |
| 1203 *err = __nacl_irt_pselect (nfds, readfds, writefds, exceptfds, timeout, | 1195 return 0; |
| 1204 sigmask, &count); | |
| 1205 return count; | |
| 1206 } | 1196 } |
| 1207 | 1197 |
| 1208 __extern_always_inline long | 1198 __extern_always_inline long |
| 1209 INTERNAL_SYSCALL_ptrace_4 (int *err, enum __ptrace_request request, pid_t pid, | 1199 INTERNAL_SYSCALL_ptrace_4 (int *err, enum __ptrace_request request, pid_t pid, |
| 1210 void *addr, void *data) | 1200 void *addr, void *data) |
| 1211 { | 1201 { |
| 1212 *err = (38 /* ENOSYS */); | 1202 *err = (38 /* ENOSYS */); |
| 1213 return 0; | 1203 return 0; |
| 1214 } | 1204 } |
| 1215 | 1205 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1308 INTERNAL_SYSCALL_renameat_4 (int *err, int olddfd, const char *oldname, | 1298 INTERNAL_SYSCALL_renameat_4 (int *err, int olddfd, const char *oldname, |
| 1309 int newdfd, const char *newname) | 1299 int newdfd, const char *newname) |
| 1310 { | 1300 { |
| 1311 *err = (38 /* ENOSYS */); | 1301 *err = (38 /* ENOSYS */); |
| 1312 return 0; | 1302 return 0; |
| 1313 } | 1303 } |
| 1314 | 1304 |
| 1315 __extern_always_inline int | 1305 __extern_always_inline int |
| 1316 INTERNAL_SYSCALL_rmdir_1 (int *err, const char *pathname) | 1306 INTERNAL_SYSCALL_rmdir_1 (int *err, const char *pathname) |
| 1317 { | 1307 { |
| 1318 *err = __nacl_irt_rmdir (pathname); | 1308 *err = (38 /* ENOSYS */); |
| 1319 return 0; | 1309 return 0; |
| 1320 } | 1310 } |
| 1321 | 1311 |
| 1322 __extern_always_inline int | 1312 __extern_always_inline int |
| 1323 INTERNAL_SYSCALL_rt_sigpending_2 (int *err, sigset_t *set, size_t sigsetsize) | 1313 INTERNAL_SYSCALL_rt_sigpending_2 (int *err, sigset_t *set, size_t sigsetsize) |
| 1324 { | 1314 { |
| 1325 *err = (38 /* ENOSYS */); | 1315 *err = (38 /* ENOSYS */); |
| 1326 return 0; | 1316 return 0; |
| 1327 } | 1317 } |
| 1328 | 1318 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 } | 1420 } |
| 1431 | 1421 |
| 1432 #ifdef __i386__ | 1422 #ifdef __i386__ |
| 1433 #define INTERNAL_SYSCALL_select_5 INTERNAL_SYSCALL__newselect_5 | 1423 #define INTERNAL_SYSCALL_select_5 INTERNAL_SYSCALL__newselect_5 |
| 1434 #endif | 1424 #endif |
| 1435 __extern_always_inline int | 1425 __extern_always_inline int |
| 1436 INTERNAL_SYSCALL_select_5 (int *err, int nfds, fd_set *readfds, | 1426 INTERNAL_SYSCALL_select_5 (int *err, int nfds, fd_set *readfds, |
| 1437 fd_set *writefds, fd_set *exceptfds, | 1427 fd_set *writefds, fd_set *exceptfds, |
| 1438 const struct timeval *timeout) | 1428 const struct timeval *timeout) |
| 1439 { | 1429 { |
| 1440 int count; | 1430 *err = (38 /* ENOSYS */); |
| 1441 *err = __nacl_irt_select (nfds, readfds, writefds, exceptfds, timeout, &count)
; | 1431 return 0; |
| 1442 return count; | |
| 1443 } | 1432 } |
| 1444 | 1433 |
| 1445 __extern_always_inline int | 1434 __extern_always_inline int |
| 1446 INTERNAL_SYSCALL_semctl_4 (int *err, int semid, int semnum, int cmd, | 1435 INTERNAL_SYSCALL_semctl_4 (int *err, int semid, int semnum, int cmd, |
| 1447 #ifdef _SEM_SEMUN_UNDEFINED | 1436 #ifdef _SEM_SEMUN_UNDEFINED |
| 1448 int semun) | 1437 int semun) |
| 1449 #else | 1438 #else |
| 1450 union semun semun) | 1439 union semun semun) |
| 1451 #endif | 1440 #endif |
| 1452 { | 1441 { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 __extern_always_inline int | 1642 __extern_always_inline int |
| 1654 INTERNAL_SYSCALL_signalfd_3 (int *err, int fd, const sigset_t *mask, | 1643 INTERNAL_SYSCALL_signalfd_3 (int *err, int fd, const sigset_t *mask, |
| 1655 size_t sigsetsize) | 1644 size_t sigsetsize) |
| 1656 { | 1645 { |
| 1657 return INTERNAL_SYSCALL_signalfd4_4 (err, fd, mask, sigsetsize, 0); | 1646 return INTERNAL_SYSCALL_signalfd4_4 (err, fd, mask, sigsetsize, 0); |
| 1658 } | 1647 } |
| 1659 | 1648 |
| 1660 __extern_always_inline int | 1649 __extern_always_inline int |
| 1661 INTERNAL_SYSCALL_socket_3 (int *err, int domain, int type, int protocol) | 1650 INTERNAL_SYSCALL_socket_3 (int *err, int domain, int type, int protocol) |
| 1662 { | 1651 { |
| 1663 int sd; | 1652 *err = (38 /* ENOSYS */); |
| 1664 *err = __nacl_irt_socket (domain, type, protocol, &sd); | |
| 1665 return sd; | |
| 1666 } | |
| 1667 | |
| 1668 __extern_always_inline int | |
| 1669 INTERNAL_SYSCALL_accept_3 (int *err, int sockfd, struct sockaddr* addr, | |
| 1670 socklen_t* addr_len) | |
| 1671 { | |
| 1672 int sd; | |
| 1673 *err = __nacl_irt_accept (sockfd, addr, addr_len, &sd); | |
| 1674 return sd; | |
| 1675 } | |
| 1676 | |
| 1677 __extern_always_inline int | |
| 1678 INTERNAL_SYSCALL_bind_3 (int *err, int sockfd, struct sockaddr* addr, | |
| 1679 socklen_t addr_len) | |
| 1680 { | |
| 1681 *err = __nacl_irt_bind (sockfd, addr, addr_len); | |
| 1682 return 0; | 1653 return 0; |
| 1683 } | 1654 } |
| 1684 | 1655 |
| 1685 __extern_always_inline int | |
| 1686 INTERNAL_SYSCALL_getpeername_3 (int *err, int sockfd, struct sockaddr* addr, | |
| 1687 socklen_t* addr_len) | |
| 1688 { | |
| 1689 *err = __nacl_irt_getpeername (sockfd, addr, addr_len); | |
| 1690 return 0; | |
| 1691 } | |
| 1692 | |
| 1693 __extern_always_inline int | |
| 1694 INTERNAL_SYSCALL_getsockname_3 (int *err, int sockfd, struct sockaddr* addr, | |
| 1695 socklen_t* addr_len) | |
| 1696 { | |
| 1697 *err = __nacl_irt_getsockname (sockfd, addr, addr_len); | |
| 1698 return 0; | |
| 1699 } | |
| 1700 | |
| 1701 __extern_always_inline int | |
| 1702 INTERNAL_SYSCALL_getsockopt_5 (int *err, int sockfd, int level, int optname, | |
| 1703 void *optval, socklen_t *optlen) | |
| 1704 { | |
| 1705 *err = __nacl_irt_getsockopt (sockfd, level, optname, optval, optlen); | |
| 1706 return 0; | |
| 1707 } | |
| 1708 | |
| 1709 __extern_always_inline int | |
| 1710 INTERNAL_SYSCALL_setsockopt_5 (int *err, int sockfd, int level, int optname, | |
| 1711 const void *optval, socklen_t optlen) | |
| 1712 { | |
| 1713 *err = __nacl_irt_setsockopt (sockfd, level, optname, optval, optlen); | |
| 1714 return 0; | |
| 1715 } | |
| 1716 | |
| 1717 __extern_always_inline int | |
| 1718 INTERNAL_SYSCALL_listen_2 (int *err, int sockfd, int backlog) | |
| 1719 { | |
| 1720 *err = __nacl_irt_listen (sockfd, backlog); | |
| 1721 return 0; | |
| 1722 } | |
| 1723 | |
| 1724 __extern_always_inline int | |
| 1725 INTERNAL_SYSCALL_connect_3 (int *err, int sockfd, struct sockaddr* addr, | |
| 1726 socklen_t addr_len) | |
| 1727 { | |
| 1728 *err = __nacl_irt_connect (sockfd, addr, addr_len); | |
| 1729 return 0; | |
| 1730 } | |
| 1731 | |
| 1732 __extern_always_inline int | |
| 1733 INTERNAL_SYSCALL_socketpair_4 (int *err, int domain, int type, int protocol, | |
| 1734 int sv[2]) | |
| 1735 { | |
| 1736 *err = __nacl_irt_socketpair (domain, type, protocol, sv); | |
| 1737 return 0; | |
| 1738 } | |
| 1739 | |
| 1740 __extern_always_inline int | |
| 1741 INTERNAL_SYSCALL_shutdown_2 (int *err, int sockfd, int how) | |
| 1742 { | |
| 1743 *err = __nacl_irt_shutdown (sockfd, how); | |
| 1744 return 0; | |
| 1745 } | |
| 1746 | |
| 1747 __extern_always_inline int | |
| 1748 INTERNAL_SYSCALL_send_4 (int *err, int sockfd, const void *buf, size_t len, int
flags) | |
| 1749 { | |
| 1750 int ret; | |
| 1751 *err = __nacl_irt_send (sockfd, buf, len, flags, &ret); | |
| 1752 return ret; | |
| 1753 } | |
| 1754 | |
| 1755 __extern_always_inline int | |
| 1756 INTERNAL_SYSCALL_sendto_6 (int *err, int sockfd, const void *buf, size_t len, | |
| 1757 int flags, const struct sockaddr *dest_addr, | |
| 1758 socklen_t addrlen) | |
| 1759 { | |
| 1760 int ret; | |
| 1761 *err = __nacl_irt_sendto (sockfd, buf, len, flags, dest_addr, addrlen, &ret); | |
| 1762 return ret; | |
| 1763 } | |
| 1764 | |
| 1765 __extern_always_inline int | |
| 1766 INTERNAL_SYSCALL_recv_4 (int *err, int sockfd, void *buf, size_t len, int flags) | |
| 1767 { | |
| 1768 int ret; | |
| 1769 *err = __nacl_irt_recv (sockfd, buf, len, flags, &ret); | |
| 1770 return ret; | |
| 1771 } | |
| 1772 | |
| 1773 __extern_always_inline int | |
| 1774 INTERNAL_SYSCALL_recvfrom_6 (int *err, int sockfd, void *buf, size_t len, int fl
ags, | |
| 1775 struct sockaddr *dest_addr, socklen_t *addrlen) | |
| 1776 { | |
| 1777 int ret; | |
| 1778 *err = __nacl_irt_recvfrom (sockfd, buf, len, flags, dest_addr, addrlen, &ret)
; | |
| 1779 return ret; | |
| 1780 } | |
| 1781 | |
| 1782 __extern_always_inline int | |
| 1783 INTERNAL_SYSCALL_sendmsg_3 (int *err, int sockfd, const struct msghdr *msg, int
flags) | |
| 1784 { | |
| 1785 int ret; | |
| 1786 *err = __nacl_irt_sendmsg (sockfd, msg, flags, &ret); | |
| 1787 return ret; | |
| 1788 } | |
| 1789 | |
| 1790 __extern_always_inline int | |
| 1791 INTERNAL_SYSCALL_recvmsg_3 (int *err, int sockfd, struct msghdr *msg, int flags) | |
| 1792 { | |
| 1793 int ret; | |
| 1794 *err = __nacl_irt_recvmsg (sockfd, msg, flags, &ret); | |
| 1795 return ret; | |
| 1796 } | |
| 1797 | |
| 1798 __extern_always_inline ssize_t | 1656 __extern_always_inline ssize_t |
| 1799 INTERNAL_SYSCALL_splice_6 (int *err, int fd_in, loff_t *off_in, int fd_out, | 1657 INTERNAL_SYSCALL_splice_6 (int *err, int fd_in, loff_t *off_in, int fd_out, |
| 1800 loff_t *off_out, size_t len, unsigned int flags) | 1658 loff_t *off_out, size_t len, unsigned int flags) |
| 1801 { | 1659 { |
| 1802 *err = (38 /* ENOSYS */); | 1660 *err = (38 /* ENOSYS */); |
| 1803 return 0; | 1661 return 0; |
| 1804 } | 1662 } |
| 1805 | 1663 |
| 1806 __extern_always_inline int | 1664 __extern_always_inline int |
| 1807 INTERNAL_SYSCALL_stime_1 (int *err, time_t *t) | 1665 INTERNAL_SYSCALL_stime_1 (int *err, time_t *t) |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2247 #define PSEUDO_END_ERRVAL(name) \ | 2105 #define PSEUDO_END_ERRVAL(name) \ |
| 2248 END (name) | 2106 END (name) |
| 2249 | 2107 |
| 2250 #undef SYSCALL_ERROR_HANDLER_TLS_STORE | 2108 #undef SYSCALL_ERROR_HANDLER_TLS_STORE |
| 2251 #define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \ | 2109 #define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \ |
| 2252 movl %gs:0, %eax; \ | 2110 movl %gs:0, %eax; \ |
| 2253 movl src, (%eax,destoff) | 2111 movl src, (%eax,destoff) |
| 2254 | 2112 |
| 2255 #endif | 2113 #endif |
| 2256 #endif | 2114 #endif |
| OLD | NEW |