Home
last modified time | relevance | path

Searched refs:newfd (Results 1 – 22 of 22) sorted by relevance

/llvm-project/libc/src/unistd/linux/
H A Ddup2.cpp21 LLVM_LIBC_FUNCTION(int, dup2, (int oldfd, int newfd)) {
24 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup2, oldfd, newfd);
27 // dup3 fails if oldfd is the same as newfd. So, we handle that case
29 if (oldfd == newfd) {
44 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup3, oldfd, newfd, 0);
H A Ddup3.cpp20 LLVM_LIBC_FUNCTION(int, dup3, (int oldfd, int newfd, int flags)) {
22 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup3, oldfd, newfd, flags);
/llvm-project/libc/src/spawn/
H A Dposix_spawn_file_actions_adddup2.cpp22 (posix_spawn_file_actions_t * actions, int fd, int newfd)) {
25 if (fd < 0 || newfd < 0)
29 auto *act = new (ac) SpawnFileDup2Action(fd, newfd);
H A Dfile_actions.h64 int newfd;
68 newfd(new_fdesc) {}
63 int newfd; global() member
H A Dposix_spawn_file_actions_adddup2.h18 int fd, int newfd);
/llvm-project/libc/src/spawn/linux/
H A Dposix_spawn.cpp58 bool dup2(int fd, int newfd) { in dup2()
60 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup2, fd, newfd); in dup2()
62 int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_dup3, fd, newfd, 0); in dup2()
113 if (!dup2(dup2_act->fd, dup2_act->newfd)) in child_process()
56 dup2(int fd,int newfd) dup2() argument
/llvm-project/compiler-rt/lib/tsan/rtl/
H A Dtsan_fd.cpp260 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) { in FdDup() argument
261 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd); in FdDup()
262 if (bogusfd(oldfd) || bogusfd(newfd)) in FdDup()
267 FdClose(thr, pc, newfd, write); in FdDup()
268 init(thr, pc, newfd, ref(od->sync), write); in FdDup()
339 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) { in FdSocketAccept() argument
340 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd); in FdSocketAccept()
345 init(thr, pc, newfd, &fdctx.socksync); in FdSocketAccept()
H A Dtsan_fd.h46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
54 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
H A Dtsan_interceptors_posix.cpp1748 int newfd = REAL(dup)(oldfd); in TSAN_INTERCEPTOR()
1749 if (oldfd >= 0 && newfd >= 0 && newfd != oldfd) in TSAN_INTERCEPTOR()
1750 FdDup(thr, pc, oldfd, newfd, true); in TSAN_INTERCEPTOR()
1751 return newfd; in TSAN_INTERCEPTOR()
1754 TSAN_INTERCEPTOR(int, dup2, int oldfd, int newfd) {
1755 SCOPED_TSAN_INTERCEPTOR(dup2, oldfd, newfd);
1756 int newfd2 = REAL(dup2)(oldfd, newfd);
1763 TSAN_INTERCEPTOR(int, dup3, int oldfd, int newfd, int flags) { in TSAN_INTERCEPTOR()
1764 SCOPED_TSAN_INTERCEPTOR(dup3, oldfd, newfd, flag in TSAN_INTERCEPTOR()
1720 int newfd = REAL(dup)(oldfd); TSAN_INTERCEPTOR() local
1726 TSAN_INTERCEPTOR(int,dup2,int oldfd,int newfd) TSAN_INTERCEPTOR() argument
1735 TSAN_INTERCEPTOR(int,dup3,int oldfd,int newfd,int flags) TSAN_INTERCEPTOR() argument
2507 COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx,fd,newfd) global() argument
[all...]
/llvm-project/libc/src/unistd/
H A Ddup2.h17 int dup2(int oldfd, int newfd);
H A Ddup3.h17 int dup3(int oldfd, int newfd, int flags);
/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_solaris.cpp141 DECLARE__REAL_AND_INTERNAL(uptr, dup2, int oldfd, int newfd) { in DECLARE__REAL_AND_INTERNAL() argument
142 return _REAL(dup2)(oldfd, newfd); in DECLARE__REAL_AND_INTERNAL()
H A Dsanitizer_netbsd.cpp187 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument
189 return _REAL(dup2, oldfd, newfd); in internal_dup2()
H A Dsanitizer_posix.h56 uptr internal_dup2(int oldfd, int newfd);
H A Dsanitizer_mac.cpp204 uptr internal_dup2(int oldfd, int newfd) { in internal_dup2() argument
205 return dup2(oldfd, newfd); in internal_dup2()
H A Dsanitizer_linux.cpp539 uptr internal_dup2(int oldfd, int newfd) { in DirExists()
541 return internal_syscall(SYSCALL(dup3), oldfd, newfd, 0); in DirExists()
543 return internal_syscall(SYSCALL(dup2), oldfd, newfd); in DirExists()
464 internal_dup2(int oldfd,int newfd) internal_dup2() argument
H A Dsanitizer_common_syscalls.inc1366 PRE_SYSCALL(dup2)(long oldfd, long newfd) {}
1368 POST_SYSCALL(dup2)(long res, long oldfd, long newfd) {}
1370 PRE_SYSCALL(dup3)(long oldfd, long newfd, long flags) {}
1372 POST_SYSCALL(dup3)(long res, long oldfd, long newfd, long flags) {}
/llvm-project/compiler-rt/lib/hwasan/
H A Dhwasan_interceptors.cpp124 # define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ argument
128 (void)(newfd); \
/llvm-project/compiler-rt/include/sanitizer/
H A Dlinux_syscall_hooks.h730 #define __sanitizer_syscall_pre_dup2(oldfd, newfd) \ argument
731 __sanitizer_syscall_pre_impl_dup2((long)(oldfd), (long)(newfd))
732 #define __sanitizer_syscall_post_dup2(res, oldfd, newfd) \ argument
733 __sanitizer_syscall_post_impl_dup2(res, (long)(oldfd), (long)(newfd))
734 #define __sanitizer_syscall_pre_dup3(oldfd, newfd, flags) \ argument
735 __sanitizer_syscall_pre_impl_dup3((long)(oldfd), (long)(newfd), (long)(flags))
736 #define __sanitizer_syscall_post_dup3(res, oldfd, newfd, flags) \ argument
737 __sanitizer_syscall_post_impl_dup3(res, (long)(oldfd), (long)(newfd), \
2430 void __sanitizer_syscall_pre_impl_dup2(long oldfd, long newfd);
2431 void __sanitizer_syscall_post_impl_dup2(long res, long oldfd, long newfd);
[all …]
/llvm-project/compiler-rt/lib/memprof/
H A Dmemprof_interceptors.cpp79 #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ argument
/llvm-project/compiler-rt/lib/asan/
H A Dasan_interceptors.cpp119 #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \ argument
/llvm-project/compiler-rt/lib/msan/
H A Dmsan_interceptors.cpp1432 #define COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx, fd, newfd) \
1436 COMMON_INTERCEPTOR_FD_SOCKET_ACCEPT(ctx,fd,newfd) global() argument