/third_party/musl/src/unistd/ |
D | faccessat.c | 18 if (__syscall(SYS_setregid, __syscall(SYS_getegid), -1) in checker() 19 || __syscall(SYS_setreuid, __syscall(SYS_geteuid), -1)) in checker() 20 __syscall(SYS_exit, 1); in checker() 21 ret = __syscall(SYS_faccessat, c->fd, c->filename, c->amode, 0); in checker() 22 __syscall(SYS_write, c->p, &ret, sizeof ret); in checker() 46 __syscall(SYS_close, p[1]); in faccessat() 48 if (pid<0 || __syscall(SYS_read, p[0], &ret, sizeof ret) != sizeof(ret)) in faccessat() 50 __syscall(SYS_close, p[0]); in faccessat() 51 __syscall(SYS_wait4, pid, &status, __WCLONE, 0); in faccessat()
|
D | pipe2.c | 9 int ret = __syscall(SYS_pipe2, fd, flag); in pipe2() 14 __syscall(SYS_fcntl, fd[0], F_SETFD, FD_CLOEXEC); in pipe2() 15 __syscall(SYS_fcntl, fd[1], F_SETFD, FD_CLOEXEC); in pipe2() 18 __syscall(SYS_fcntl, fd[0], F_SETFL, O_NONBLOCK); in pipe2() 19 __syscall(SYS_fcntl, fd[1], F_SETFL, O_NONBLOCK); in pipe2()
|
D | dup3.c | 13 while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY); in __dup3() 16 while ((r=__syscall(SYS_dup2, old, new))==-EBUSY); in __dup3() 17 if (flags & O_CLOEXEC) __syscall(SYS_fcntl, new, F_SETFD, FD_CLOEXEC); in __dup3() 19 while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY); in __dup3()
|
D | dup2.c | 10 while ((r=__syscall(SYS_dup2, old, new))==-EBUSY); in dup2() 13 r = __syscall(SYS_fcntl, old, F_GETFD); in dup2() 16 while ((r=__syscall(SYS_dup3, old, new, 0))==-EBUSY); in dup2()
|
/third_party/musl/porting/liteos_a/user/src/process/ |
D | posix_spawn.c | 25 return __syscall(SYS_dup2, old, new); in __sys_dup2() 27 return __syscall(SYS_dup3, old, new, 0); in __sys_dup2() 69 if ((ret=__syscall(SYS_setsid)) < 0) in child() 73 if ((ret=__syscall(SYS_setpgid, 0, attr->__pgrp))) in child() 80 if ((ret=__syscall(SYS_setgid, __syscall(SYS_getgid))) || in child() 81 (ret=__syscall(SYS_setuid, __syscall(SYS_getuid))) ) in child() 94 ret = __syscall(SYS_dup, p); in child() 96 __syscall(SYS_close, p); in child() 101 __syscall(SYS_close, op->fd); in child() 113 ret = __syscall(SYS_fcntl, fd, F_GETFD); in child() [all …]
|
/third_party/musl/src/process/ |
D | posix_spawn.c | 24 return __syscall(SYS_dup2, old, new); in __sys_dup2() 26 return __syscall(SYS_dup3, old, new, 0); in __sys_dup2() 68 if ((ret=__syscall(SYS_setsid)) < 0) in child() 72 if ((ret=__syscall(SYS_setpgid, 0, attr->__pgrp))) in child() 79 if ((ret=__syscall(SYS_setgid, __syscall(SYS_getgid))) || in child() 80 (ret=__syscall(SYS_setuid, __syscall(SYS_getuid))) ) in child() 93 ret = __syscall(SYS_dup, p); in child() 95 __syscall(SYS_close, p); in child() 100 __syscall(SYS_close, op->fd); in child() 112 ret = __syscall(SYS_fcntl, fd, F_GETFD); in child() [all …]
|
/third_party/musl/porting/liteos_a/user/src/fcntl/ |
D | fcntl.c | 17 int ret = __syscall(SYS_fcntl, fd, F_GETOWN_EX, &ex); in fcntl() 18 if (ret == -EINVAL) return __syscall(SYS_fcntl, fd, cmd, (void *)arg); in fcntl() 23 int ret = __syscall(SYS_fcntl, fd, F_DUPFD_CLOEXEC, arg); in fcntl() 26 __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC); in fcntl() 29 ret = __syscall(SYS_fcntl, fd, F_DUPFD_CLOEXEC, 0); in fcntl() 31 if (ret >= 0) __syscall(SYS_close, ret); in fcntl() 34 ret = __syscall(SYS_fcntl, fd, F_DUPFD, arg); in fcntl() 35 if (ret >= 0) __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC); in fcntl()
|
/third_party/musl/src/fcntl/ |
D | fcntl.c | 18 int ret = __syscall(SYS_fcntl, fd, F_GETOWN_EX, &ex); in fcntl() 19 if (ret == -EINVAL) return __syscall(SYS_fcntl, fd, cmd, (void *)arg); in fcntl() 24 int ret = __syscall(SYS_fcntl, fd, F_DUPFD_CLOEXEC, arg); in fcntl() 27 __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC); in fcntl() 30 ret = __syscall(SYS_fcntl, fd, F_DUPFD_CLOEXEC, 0); in fcntl() 32 if (ret >= 0) __syscall(SYS_close, ret); in fcntl() 35 ret = __syscall(SYS_fcntl, fd, F_DUPFD, arg); in fcntl() 36 if (ret >= 0) __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC); in fcntl()
|
/third_party/musl/porting/liteos_a/user/src/unistd/ |
D | pipe2.c | 11 int ret = __syscall(SYS_pipe2, fd, flag); in pipe2() 16 __syscall(SYS_fcntl, fd[0], F_SETFD, FD_CLOEXEC); in pipe2() 17 __syscall(SYS_fcntl, fd[1], F_SETFD, FD_CLOEXEC); in pipe2() 20 __syscall(SYS_fcntl, fd[0], F_SETFL, O_NONBLOCK); in pipe2() 21 __syscall(SYS_fcntl, fd[1], F_SETFL, O_NONBLOCK); in pipe2()
|
/third_party/musl/src/stat/ |
D | fchmodat.c | 18 if ((ret = __syscall(SYS_fstatat, fd, path, &st, flag))) in fchmodat() 23 if ((fd2 = __syscall(SYS_openat, fd, path, O_RDONLY|O_PATH|O_NOFOLLOW|O_NOCTTY|O_CLOEXEC)) < 0) { in fchmodat() 30 ret = __syscall(SYS_fstatat, AT_FDCWD, proc, &st, 0); in fchmodat() 33 else ret = __syscall(SYS_fchmodat, AT_FDCWD, proc, mode); in fchmodat() 36 __syscall(SYS_close, fd2); in fchmodat()
|
D | fstatat.c | 40 int ret = __syscall(SYS_statx, fd, path, flag, 0x7ff, &stx); in fstatat_statx() 78 ret = __syscall(SYS_fstat, fd, &kst); in fstatat_kstat() 79 if (ret==-EBADF && __syscall(SYS_fcntl, fd, F_GETFD)>=0) { in fstatat_kstat() 80 ret = __syscall(SYS_fstatat, fd, path, &kst, flag); in fstatat_kstat() 85 ret = __syscall(SYS_stat, buf, &kst); in fstatat_kstat() 87 ret = __syscall(SYS_fstatat, AT_FDCWD, buf, &kst, 0); in fstatat_kstat() 94 ret = __syscall(SYS_lstat, path, &kst); in fstatat_kstat() 98 ret = __syscall(SYS_stat, path, &kst); in fstatat_kstat() 100 else ret = __syscall(SYS_fstatat, fd, path, &kst, flag); in fstatat_kstat()
|
D | utimensat.c | 26 r = __syscall(SYS_utimensat_time64, fd, path, times ? in utimensat() 32 r = __syscall(SYS_utimensat, fd, path, in utimensat() 35 r = __syscall(SYS_utimensat, fd, path, times, flags); in utimensat() 55 r = __syscall(SYS_futimesat, fd, path, tv); in utimensat() 57 r = __syscall(SYS_utimes, path, tv); in utimensat()
|
/third_party/musl/porting/liteos_a/user/src/stdio/ |
D | popen.c | 32 __syscall(SYS_close, p[0]); in popen() 33 __syscall(SYS_close, p[1]); in popen() 49 __syscall(SYS_close, p[1-op]); in popen() 62 __syscall(SYS_close, p[1-op]); in popen() 71 __syscall(SYS_close, p[1-op]); in popen()
|
/third_party/musl/src/stdio/ |
D | popen.c | 30 __syscall(SYS_close, p[0]); in popen() 31 __syscall(SYS_close, p[1]); in popen() 47 __syscall(SYS_close, p[1-op]); in popen() 60 __syscall(SYS_close, p[1-op]); in popen() 69 __syscall(SYS_close, p[1-op]); in popen()
|
D | remove.c | 9 int r = __syscall(SYS_unlink, path); in remove() 11 int r = __syscall(SYS_unlinkat, AT_FDCWD, path, 0); in remove() 14 if (r==-EISDIR) r = __syscall(SYS_rmdir, path); in remove() 16 if (r==-EISDIR) r = __syscall(SYS_unlinkat, AT_FDCWD, path, AT_REMOVEDIR); in remove()
|
D | __fdopen.c | 30 if (strchr(mode, 'e')) __syscall(SYS_fcntl, fd, F_SETFD, FD_CLOEXEC); in __fdopen() 34 int flags = __syscall(SYS_fcntl, fd, F_GETFL); in __fdopen() 36 __syscall(SYS_fcntl, fd, F_SETFL, flags | O_APPEND); in __fdopen() 46 if (!(f->flags & F_NOWR) && !__syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz)) in __fdopen()
|
D | tmpfile.c | 19 __syscall(SYS_unlink, s); in tmpfile() 21 __syscall(SYS_unlinkat, AT_FDCWD, s, 0); in tmpfile() 24 if (!f) __syscall(SYS_close, fd); in tmpfile()
|
/third_party/musl/src/linux/ |
D | signalfd.c | 9 int ret = __syscall(SYS_signalfd4, fd, sigs, _NSIG/8, flags); in signalfd() 12 ret = __syscall(SYS_signalfd, fd, sigs, _NSIG/8); in signalfd() 15 __syscall(SYS_fcntl, ret, F_SETFD, FD_CLOEXEC); in signalfd() 17 __syscall(SYS_fcntl, ret, F_SETFL, O_NONBLOCK); in signalfd()
|
D | epoll.c | 13 int r = __syscall(SYS_epoll_create1, flags); in epoll_create1() 15 if (r==-ENOSYS && !flags) r = __syscall(SYS_epoll_create, 1); in epoll_create1() 27 int r = __syscall(SYS_epoll_pwait, fd, ev, cnt, to, sigs, _NSIG/8); in epoll_pwait() 29 if (r==-ENOSYS && !sigs) r = __syscall(SYS_epoll_wait, fd, ev, cnt, to); in epoll_pwait()
|
/third_party/musl/src/network/ |
D | socketpair.c | 16 __syscall(SYS_fcntl, fd[0], F_SETFD, FD_CLOEXEC); in socketpair() 17 __syscall(SYS_fcntl, fd[1], F_SETFD, FD_CLOEXEC); in socketpair() 20 __syscall(SYS_fcntl, fd[0], F_SETFL, O_NONBLOCK); in socketpair() 21 __syscall(SYS_fcntl, fd[1], F_SETFL, O_NONBLOCK); in socketpair()
|
/third_party/musl/porting/linux/user/src/time/ |
D | clock_gettime.c | 94 r = __syscall(SYS_clock_gettime64, clk, ts); in __clock_gettime() 98 r = __syscall(SYS_clock_gettime, clk, ts32); in __clock_gettime() 100 r = __syscall(SYS_gettimeofday, ts32, 0); in __clock_gettime() 110 r = __syscall(SYS_clock_gettime, clk, ts); in __clock_gettime() 113 __syscall(SYS_gettimeofday, ts, 0); in __clock_gettime()
|
/third_party/musl/src/time/ |
D | clock_gettime.c | 78 r = __syscall(SYS_clock_gettime64, clk, ts); in __clock_gettime() 82 r = __syscall(SYS_clock_gettime, clk, ts32); in __clock_gettime() 84 r = __syscall(SYS_gettimeofday, ts32, 0); in __clock_gettime() 94 r = __syscall(SYS_clock_gettime, clk, ts); in __clock_gettime() 97 __syscall(SYS_gettimeofday, ts, 0); in __clock_gettime()
|
/third_party/musl/porting/linux/user/src/stdio/ |
D | __fdopen.c | 70 __syscall(SYS_fcntl, fd, F_SETFD, FD_CLOEXEC); in __fdopen() 75 int flags = __syscall(SYS_fcntl, fd, F_GETFL); in __fdopen() 77 __syscall(SYS_fcntl, fd, F_SETFL, flags | O_APPEND); in __fdopen() 87 if (!(f->flags & F_NOWR) && !__syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz)) { in __fdopen()
|
/third_party/musl/src/exit/ |
D | abort.c | 22 __syscall(SYS_rt_sigaction, SIGABRT, in abort() 24 __syscall(SYS_tkill, __pthread_self()->tid, SIGABRT); in abort() 25 __syscall(SYS_rt_sigprocmask, SIG_UNBLOCK, in abort()
|
/third_party/musl/src/signal/ |
D | block.c | 33 __syscall(SYS_rt_sigprocmask, SIG_BLOCK, &all_mask, set, _NSIG/8); in __block_all_sigs() 38 __syscall(SYS_rt_sigprocmask, SIG_BLOCK, &app_mask, set, _NSIG/8); in __block_app_sigs() 43 __syscall(SYS_rt_sigprocmask, SIG_SETMASK, set, 0, _NSIG/8); in __restore_sigs()
|