| 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 = (38 /* ENOSYS */); | 117 *err = __nacl_irt_chdir (path); |
| 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 flags) | 241 INTERNAL_SYSCALL_epoll_create_1 (int *err, int size) |
| 242 { | 242 { |
| 243 *err = (38 /* ENOSYS */); | 243 int fd; |
| 244 return 0; | 244 *err = __nacl_irt_epoll_create (size, &fd); |
| 245 return fd; |
| 245 } | 246 } |
| 246 | 247 |
| 247 __extern_always_inline int | 248 __extern_always_inline int |
| 248 INTERNAL_SYSCALL_epoll_create1_1 (int *err, int flags) | 249 INTERNAL_SYSCALL_epoll_create1_1 (int *err, int flags) |
| 249 { | 250 { |
| 250 *err = (38 /* ENOSYS */); | 251 int fd; |
| 251 return 0; | 252 *err = __nacl_irt_epoll_create1 (flags, &fd); |
| 253 return fd; |
| 252 } | 254 } |
| 253 | 255 |
| 254 __extern_always_inline int | 256 __extern_always_inline int |
| 255 INTERNAL_SYSCALL_epoll_ctl_4 (int *err, int epfd, int op, int fd, | 257 INTERNAL_SYSCALL_epoll_ctl_4 (int *err, int epfd, int op, int fd, |
| 256 struct epoll_event *event) | 258 struct epoll_event *event) |
| 257 { | 259 { |
| 258 *err = (38 /* ENOSYS */); | 260 *err = __nacl_irt_epoll_ctl (epfd, op, fd, event); |
| 259 return 0; | 261 return 0; |
| 260 } | 262 } |
| 261 | 263 |
| 262 __extern_always_inline int | 264 __extern_always_inline int |
| 263 INTERNAL_SYSCALL_epoll_pwait_6 (int *err, int epfd, struct epoll_event *events, | 265 INTERNAL_SYSCALL_epoll_pwait_6 (int *err, int epfd, struct epoll_event *events, |
| 264 int maxevents, int timeout, | 266 int maxevents, int timeout, |
| 265 » » » » const sigset_t *sigmask, size_t sigsetsize) | 267 » » » » const sigset_t *sigmask, size_t sigset_size) |
| 266 { | 268 { |
| 267 *err = (38 /* ENOSYS */); | 269 int count; |
| 268 return 0; | 270 *err = __nacl_irt_epoll_pwait (epfd, events, maxevents, timeout, sigmask, |
| 271 sigset_size, &count); |
| 272 return count; |
| 269 } | 273 } |
| 270 | 274 |
| 271 __extern_always_inline int | 275 __extern_always_inline int |
| 272 INTERNAL_SYSCALL_execve_3 (int *err, const char *filename, char *const argv[], | 276 INTERNAL_SYSCALL_execve_3 (int *err, const char *filename, char *const argv[], |
| 273 char *const envp[]) | 277 char *const envp[]) |
| 274 { | 278 { |
| 275 *err = (38 /* ENOSYS */); | 279 *err = (38 /* ENOSYS */); |
| 276 return 0; | 280 return 0; |
| 277 } | 281 } |
| 278 | 282 |
| 279 __extern_always_inline int | 283 __extern_always_inline int |
| 280 INTERNAL_SYSCALL_epoll_wait_4 (int *err, int epfd, struct epoll_event *events, | 284 INTERNAL_SYSCALL_epoll_wait_4 (int *err, int epfd, struct epoll_event *events, |
| 281 int maxevents, int timeout) | 285 int maxevents, int timeout) |
| 282 { | 286 { |
| 283 *err = (38 /* ENOSYS */); | 287 int count; |
| 284 return 0; | 288 *err = __nacl_irt_epoll_wait (epfd, events, maxevents, timeout, &count); |
| 289 return count; |
| 285 } | 290 } |
| 286 | 291 |
| 287 __extern_always_inline int | 292 __extern_always_inline int |
| 288 INTERNAL_SYSCALL_eventfd2_2 (int *err, unsigned int initval, int flags) | 293 INTERNAL_SYSCALL_eventfd2_2 (int *err, unsigned int initval, int flags) |
| 289 { | 294 { |
| 290 *err = (38 /* ENOSYS */); | 295 *err = (38 /* ENOSYS */); |
| 291 return 0; | 296 return 0; |
| 292 } | 297 } |
| 293 | 298 |
| 294 __extern_always_inline int | 299 __extern_always_inline int |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 return 0; | 586 return 0; |
| 582 } | 587 } |
| 583 | 588 |
| 584 /* NOTE! The user-level library version returns a character pointer. | 589 /* NOTE! The user-level library version returns a character pointer. |
| 585 | 590 |
| 586 The system call just returns the length of the buffer filled (which includes | 591 The system call just returns the length of the buffer filled (which includes |
| 587 the ending '\0' character), or zero in case of error. */ | 592 the ending '\0' character), or zero in case of error. */ |
| 588 __extern_always_inline int | 593 __extern_always_inline int |
| 589 INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size) | 594 INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size) |
| 590 { | 595 { |
| 591 *err = (38 /* ENOSYS */); | 596 int len; |
| 592 return 0; | 597 *err = __nacl_irt_getcwd (buf, size, &len); |
| 598 return len; |
| 593 } | 599 } |
| 594 | 600 |
| 595 __extern_always_inline gid_t | 601 __extern_always_inline gid_t |
| 596 INTERNAL_SYSCALL_getegid_0 (int *err) | 602 INTERNAL_SYSCALL_getegid_0 (int *err) |
| 597 { | 603 { |
| 598 *err = (38 /* ENOSYS */); | 604 *err = (38 /* ENOSYS */); |
| 599 return 0; | 605 return 0; |
| 600 } | 606 } |
| 601 | 607 |
| 602 __extern_always_inline uid_t | 608 __extern_always_inline uid_t |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 INTERNAL_SYSCALL_mincore_3 (int *err, void *addr, size_t length, | 914 INTERNAL_SYSCALL_mincore_3 (int *err, void *addr, size_t length, |
| 909 unsigned char *vec) | 915 unsigned char *vec) |
| 910 { | 916 { |
| 911 *err = (38 /* ENOSYS */); | 917 *err = (38 /* ENOSYS */); |
| 912 return 0; | 918 return 0; |
| 913 } | 919 } |
| 914 | 920 |
| 915 __extern_always_inline int | 921 __extern_always_inline int |
| 916 INTERNAL_SYSCALL_mkdir_2 (int *err, const char *pathname, mode_t mode) | 922 INTERNAL_SYSCALL_mkdir_2 (int *err, const char *pathname, mode_t mode) |
| 917 { | 923 { |
| 918 *err = (38 /* ENOSYS */); | 924 *err = __nacl_irt_mkdir (pathname, mode); |
| 919 return 0; | 925 return 0; |
| 920 } | 926 } |
| 921 | 927 |
| 922 __extern_always_inline int | 928 __extern_always_inline int |
| 923 INTERNAL_SYSCALL_mkdirat_3 (int *err, int dirfd, const char *pathname, | 929 INTERNAL_SYSCALL_mkdirat_3 (int *err, int dirfd, const char *pathname, |
| 924 mode_t mode) | 930 mode_t mode) |
| 925 { | 931 { |
| 926 *err = (38 /* ENOSYS */); | 932 *err = (38 /* ENOSYS */); |
| 927 return 0; | 933 return 0; |
| 928 } | 934 } |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1156 INTERNAL_SYSCALL_pivot_root_2 (int *err, const char *new_root, | 1162 INTERNAL_SYSCALL_pivot_root_2 (int *err, const char *new_root, |
| 1157 const char *put_old) | 1163 const char *put_old) |
| 1158 { | 1164 { |
| 1159 *err = (38 /* ENOSYS */); | 1165 *err = (38 /* ENOSYS */); |
| 1160 return 0; | 1166 return 0; |
| 1161 } | 1167 } |
| 1162 | 1168 |
| 1163 __extern_always_inline int | 1169 __extern_always_inline int |
| 1164 INTERNAL_SYSCALL_poll_3 (int *err, struct pollfd *fds, nfds_t nfds, int timeout) | 1170 INTERNAL_SYSCALL_poll_3 (int *err, struct pollfd *fds, nfds_t nfds, int timeout) |
| 1165 { | 1171 { |
| 1166 *err = (38 /* ENOSYS */); | 1172 int count; |
| 1167 return 0; | 1173 *err = __nacl_irt_poll (fds, nfds, timeout, &count); |
| 1174 return count; |
| 1168 } | 1175 } |
| 1169 | 1176 |
| 1170 __extern_always_inline int | 1177 __extern_always_inline int |
| 1171 INTERNAL_SYSCALL_ppoll_5 (int *err, struct pollfd *fds, nfds_t nfds, | 1178 INTERNAL_SYSCALL_ppoll_5 (int *err, struct pollfd *fds, nfds_t nfds, |
| 1172 const struct timespec *timeout, | 1179 const struct timespec *timeout, |
| 1173 » » » const sigset_t *sigmask, size_t sigsetsize) | 1180 » » » const sigset_t *sigmask, size_t sigset_size) |
| 1174 { | 1181 { |
| 1175 *err = (38 /* ENOSYS */); | 1182 int count; |
| 1176 return 0; | 1183 *err = __nacl_irt_ppoll (fds, nfds, timeout, sigmask, sigset_size, &count); |
| 1184 return count; |
| 1177 } | 1185 } |
| 1178 | 1186 |
| 1179 __extern_always_inline int | 1187 __extern_always_inline int |
| 1180 INTERNAL_SYSCALL_prctl_5 (int *err, int option, unsigned long arg2, | 1188 INTERNAL_SYSCALL_prctl_5 (int *err, int option, unsigned long arg2, |
| 1181 unsigned long arg3, unsigned long arg4, | 1189 unsigned long arg3, unsigned long arg4, |
| 1182 unsigned long arg5) | 1190 unsigned long arg5) |
| 1183 { | 1191 { |
| 1184 *err = (38 /* ENOSYS */); | 1192 *err = (38 /* ENOSYS */); |
| 1185 return 0; | 1193 return 0; |
| 1186 } | 1194 } |
| 1187 | 1195 |
| 1188 __extern_always_inline int | 1196 __extern_always_inline int |
| 1189 INTERNAL_SYSCALL_pselect6_6 (int *err, int nfds, fd_set *readfds, | 1197 INTERNAL_SYSCALL_pselect6_6 (int *err, int nfds, fd_set *readfds, |
| 1190 » » » fd_set *writefds, fd_set *exceptfds, | 1198 fd_set *writefds, fd_set *exceptfds, |
| 1191 » » » const struct timespec *timeout, | 1199 const struct timeval *timeout, |
| 1192 » » » void *sigmask) | 1200 void *sigmask) |
| 1193 { | 1201 { |
| 1194 *err = (38 /* ENOSYS */); | 1202 int count; |
| 1195 return 0; | 1203 *err = __nacl_irt_pselect (nfds, readfds, writefds, exceptfds, timeout, |
| 1204 sigmask, &count); |
| 1205 return count; |
| 1196 } | 1206 } |
| 1197 | 1207 |
| 1198 __extern_always_inline long | 1208 __extern_always_inline long |
| 1199 INTERNAL_SYSCALL_ptrace_4 (int *err, enum __ptrace_request request, pid_t pid, | 1209 INTERNAL_SYSCALL_ptrace_4 (int *err, enum __ptrace_request request, pid_t pid, |
| 1200 void *addr, void *data) | 1210 void *addr, void *data) |
| 1201 { | 1211 { |
| 1202 *err = (38 /* ENOSYS */); | 1212 *err = (38 /* ENOSYS */); |
| 1203 return 0; | 1213 return 0; |
| 1204 } | 1214 } |
| 1205 | 1215 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 INTERNAL_SYSCALL_renameat_4 (int *err, int olddfd, const char *oldname, | 1308 INTERNAL_SYSCALL_renameat_4 (int *err, int olddfd, const char *oldname, |
| 1299 int newdfd, const char *newname) | 1309 int newdfd, const char *newname) |
| 1300 { | 1310 { |
| 1301 *err = (38 /* ENOSYS */); | 1311 *err = (38 /* ENOSYS */); |
| 1302 return 0; | 1312 return 0; |
| 1303 } | 1313 } |
| 1304 | 1314 |
| 1305 __extern_always_inline int | 1315 __extern_always_inline int |
| 1306 INTERNAL_SYSCALL_rmdir_1 (int *err, const char *pathname) | 1316 INTERNAL_SYSCALL_rmdir_1 (int *err, const char *pathname) |
| 1307 { | 1317 { |
| 1308 *err = (38 /* ENOSYS */); | 1318 *err = __nacl_irt_rmdir (pathname); |
| 1309 return 0; | 1319 return 0; |
| 1310 } | 1320 } |
| 1311 | 1321 |
| 1312 __extern_always_inline int | 1322 __extern_always_inline int |
| 1313 INTERNAL_SYSCALL_rt_sigpending_2 (int *err, sigset_t *set, size_t sigsetsize) | 1323 INTERNAL_SYSCALL_rt_sigpending_2 (int *err, sigset_t *set, size_t sigsetsize) |
| 1314 { | 1324 { |
| 1315 *err = (38 /* ENOSYS */); | 1325 *err = (38 /* ENOSYS */); |
| 1316 return 0; | 1326 return 0; |
| 1317 } | 1327 } |
| 1318 | 1328 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1420 } | 1430 } |
| 1421 | 1431 |
| 1422 #ifdef __i386__ | 1432 #ifdef __i386__ |
| 1423 #define INTERNAL_SYSCALL_select_5 INTERNAL_SYSCALL__newselect_5 | 1433 #define INTERNAL_SYSCALL_select_5 INTERNAL_SYSCALL__newselect_5 |
| 1424 #endif | 1434 #endif |
| 1425 __extern_always_inline int | 1435 __extern_always_inline int |
| 1426 INTERNAL_SYSCALL_select_5 (int *err, int nfds, fd_set *readfds, | 1436 INTERNAL_SYSCALL_select_5 (int *err, int nfds, fd_set *readfds, |
| 1427 fd_set *writefds, fd_set *exceptfds, | 1437 fd_set *writefds, fd_set *exceptfds, |
| 1428 const struct timeval *timeout) | 1438 const struct timeval *timeout) |
| 1429 { | 1439 { |
| 1430 *err = (38 /* ENOSYS */); | 1440 int count; |
| 1431 return 0; | 1441 *err = __nacl_irt_select (nfds, readfds, writefds, exceptfds, timeout, &count)
; |
| 1442 return count; |
| 1432 } | 1443 } |
| 1433 | 1444 |
| 1434 __extern_always_inline int | 1445 __extern_always_inline int |
| 1435 INTERNAL_SYSCALL_semctl_4 (int *err, int semid, int semnum, int cmd, | 1446 INTERNAL_SYSCALL_semctl_4 (int *err, int semid, int semnum, int cmd, |
| 1436 #ifdef _SEM_SEMUN_UNDEFINED | 1447 #ifdef _SEM_SEMUN_UNDEFINED |
| 1437 int semun) | 1448 int semun) |
| 1438 #else | 1449 #else |
| 1439 union semun semun) | 1450 union semun semun) |
| 1440 #endif | 1451 #endif |
| 1441 { | 1452 { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 __extern_always_inline int | 1653 __extern_always_inline int |
| 1643 INTERNAL_SYSCALL_signalfd_3 (int *err, int fd, const sigset_t *mask, | 1654 INTERNAL_SYSCALL_signalfd_3 (int *err, int fd, const sigset_t *mask, |
| 1644 size_t sigsetsize) | 1655 size_t sigsetsize) |
| 1645 { | 1656 { |
| 1646 return INTERNAL_SYSCALL_signalfd4_4 (err, fd, mask, sigsetsize, 0); | 1657 return INTERNAL_SYSCALL_signalfd4_4 (err, fd, mask, sigsetsize, 0); |
| 1647 } | 1658 } |
| 1648 | 1659 |
| 1649 __extern_always_inline int | 1660 __extern_always_inline int |
| 1650 INTERNAL_SYSCALL_socket_3 (int *err, int domain, int type, int protocol) | 1661 INTERNAL_SYSCALL_socket_3 (int *err, int domain, int type, int protocol) |
| 1651 { | 1662 { |
| 1652 *err = (38 /* ENOSYS */); | 1663 int sd; |
| 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); |
| 1653 return 0; | 1682 return 0; |
| 1654 } | 1683 } |
| 1655 | 1684 |
| 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 |
| 1656 __extern_always_inline ssize_t | 1798 __extern_always_inline ssize_t |
| 1657 INTERNAL_SYSCALL_splice_6 (int *err, int fd_in, loff_t *off_in, int fd_out, | 1799 INTERNAL_SYSCALL_splice_6 (int *err, int fd_in, loff_t *off_in, int fd_out, |
| 1658 loff_t *off_out, size_t len, unsigned int flags) | 1800 loff_t *off_out, size_t len, unsigned int flags) |
| 1659 { | 1801 { |
| 1660 *err = (38 /* ENOSYS */); | 1802 *err = (38 /* ENOSYS */); |
| 1661 return 0; | 1803 return 0; |
| 1662 } | 1804 } |
| 1663 | 1805 |
| 1664 __extern_always_inline int | 1806 __extern_always_inline int |
| 1665 INTERNAL_SYSCALL_stime_1 (int *err, time_t *t) | 1807 INTERNAL_SYSCALL_stime_1 (int *err, time_t *t) |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 #define PSEUDO_END_ERRVAL(name) \ | 2247 #define PSEUDO_END_ERRVAL(name) \ |
| 2106 END (name) | 2248 END (name) |
| 2107 | 2249 |
| 2108 #undef SYSCALL_ERROR_HANDLER_TLS_STORE | 2250 #undef SYSCALL_ERROR_HANDLER_TLS_STORE |
| 2109 #define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \ | 2251 #define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \ |
| 2110 movl %gs:0, %eax; \ | 2252 movl %gs:0, %eax; \ |
| 2111 movl src, (%eax,destoff) | 2253 movl src, (%eax,destoff) |
| 2112 | 2254 |
| 2113 #endif | 2255 #endif |
| 2114 #endif | 2256 #endif |
| OLD | NEW |