Home
last modified time | relevance | path

Searched refs:fds (Results 1 – 25 of 30) sorted by relevance

12

/llvm-project-15.0.7/compiler-rt/test/tsan/
H A Dfd_dup_norace.cpp9 int fds[2]; variable
13 read(fds[0], &buf, 1); in Thread1()
14 close(fds[0]); in Thread1()
19 close(fds[1]); in Thread2()
24 fds[0] = open("/dev/random", O_RDONLY); in main()
25 fds[1] = dup2(fds[0], 100); in main()
H A Dfd_socketpair_norace.cpp8 int fds[2]; variable
13 write(fds[1], "a", 1); in Thread1()
14 close(fds[1]); in Thread1()
20 while (read(fds[0], &buf, 1) != 1) { in Thread2()
23 close(fds[0]); in Thread2()
28 socketpair(AF_UNIX, SOCK_STREAM, 0, fds); in main()
H A Dvfork.cpp10 int fds[2]; variable
15 write(fds[1], "a", 1); in Thread1()
21 while (read(fds[0], &buf, 1) != 1) { in Thread2()
28 pipe(fds); in main()
39 close(fds[0]); in main()
40 close(fds[1]); in main()
H A Dstress.cpp11 int fds[2]; variable
38 write(fds[1], fds, 1); in Thread()
42 read(fds[0], &buf, sizeof(buf)); in Thread()
75 if (pipe(fds)) in main()
77 if (fcntl(fds[0], F_SETFL, O_NONBLOCK)) in main()
79 if (fcntl(fds[1], F_SETFL, O_NONBLOCK)) in main()
H A Dfd_location.cpp4 int fds[2]; variable
7 write(fds[1], "a", 1); in Thread1()
14 close(fds[0]); in Thread2()
15 close(fds[1]); in Thread2()
21 pipe(fds); in main()
H A Dfd_pipe_race.cpp4 int fds[2]; variable
7 write(fds[1], "a", 1); in Thread1()
14 close(fds[0]); in Thread2()
15 close(fds[1]); in Thread2()
21 pipe(fds); in main()
H A Dfd_tid_recycled.cpp4 int fds[2]; variable
7 pipe(fds); in ThreadCreatePipe()
16 write(fds[1], "a", 1); in ThreadWrite()
23 close(fds[0]); in ThreadClose()
24 close(fds[1]); in ThreadClose()
H A Dfd_pipe_norace.cpp6 int fds[2]; variable
11 write(fds[1], "a", 1); in Thread1()
17 while (read(fds[0], &buf, 1) != 1) { in Thread2()
24 pipe(fds); in main()
/llvm-project-15.0.7/lldb/examples/interposing/darwin/fd_interposing/
H A DFDInterposing.cpp559 fds[0] = -1; in socketpair$__interposed__()
560 fds[1] = -1; in socketpair$__interposed__()
566 pid, domain, type, protocol, fds[0], fds[1], err)); in socketpair$__interposed__()
569 if (fds[0] >= 0) in socketpair$__interposed__()
571 if (fds[1] >= 0) in socketpair$__interposed__()
862 fds[0] = -1; in pipe$__interposed__()
863 fds[1] = -1; in pipe$__interposed__()
867 "pid=%i: pipe ({fd=%i, fd=%i}) -> err=%i", pid, fds[0], fds[1], err)); in pipe$__interposed__()
870 if (fds[0] >= 0) in pipe$__interposed__()
872 if (fds[1] >= 0) in pipe$__interposed__()
[all …]
/llvm-project-15.0.7/lldb/source/Host/common/
H A DMainLoop.cpp49 int ppoll(struct pollfd *fds, size_t nfds, const struct timespec *timeout_ts, in ppoll() argument
55 return POLL(fds, nfds, timeout); in ppoll()
226 std::vector<IOObject::WaitableHandle> fds; local
229 fds.push_back(fd.first);
231 for (const auto &handle : fds) {
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/
H A Dtsan_platform_linux.cpp322 int ExtractResolvFDs(void *state, int *fds, int nfd) { in ExtractResolvFDs() argument
328 fds[cnt++] = statp->_u._ext.nssocks[i]; in ExtractResolvFDs()
339 int ExtractRecvmsgFDs(void *msgp, int *fds, int nfd) { in ExtractRecvmsgFDs() argument
346 int n = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(fds[0]); in ExtractRecvmsgFDs()
348 fds[res++] = ((int*)CMSG_DATA(cmsg))[i]; in ExtractRecvmsgFDs()
H A Dtsan_fd.cpp95 FdDesc *fds = reinterpret_cast<FdDesc *>(l1); in fddesc() local
96 return &fds[fd % kTableSizeL2]; in fddesc()
H A Dtsan_platform.h869 int ExtractResolvFDs(void *state, int *fds, int nfd);
870 int ExtractRecvmsgFDs(void *msg, int *fds, int nfd);
H A Dtsan_interceptors_posix.cpp1790 int fds[64]; in TSAN_INTERCEPTOR() local
1791 int cnt = ExtractResolvFDs(state, fds, ARRAY_SIZE(fds)); in TSAN_INTERCEPTOR()
1792 for (int i = 0; i < cnt; i++) FdClose(thr, pc, fds[i]); in TSAN_INTERCEPTOR()
2326 int fds[64]; in HandleRecvmsg() local
2327 int cnt = ExtractRecvmsgFDs(msg, fds, ARRAY_SIZE(fds)); in HandleRecvmsg()
2329 FdEventCreate(thr, pc, fds[i]); in HandleRecvmsg()
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/
H A Dtsan_platform_linux.cpp334 int ExtractResolvFDs(void *state, int *fds, int nfd) { in ExtractResolvFDs() argument
340 fds[cnt++] = statp->_u._ext.nssocks[i]; in ExtractResolvFDs()
351 int ExtractRecvmsgFDs(void *msgp, int *fds, int nfd) { in ExtractRecvmsgFDs() argument
358 int n = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(fds[0]); in ExtractRecvmsgFDs()
360 fds[res++] = ((int*)CMSG_DATA(cmsg))[i]; in ExtractRecvmsgFDs()
H A Dtsan_fd.cpp89 FdDesc *fds = reinterpret_cast<FdDesc *>(l1); in fddesc() local
90 return &fds[fd % kTableSizeL2]; in fddesc()
H A Dtsan_interceptors_posix.cpp1787 int fds[64]; in TSAN_INTERCEPTOR() local
1788 int cnt = ExtractResolvFDs(state, fds, ARRAY_SIZE(fds)); in TSAN_INTERCEPTOR()
1790 if (fds[i] > 0) in TSAN_INTERCEPTOR()
1791 FdClose(thr, pc, fds[i]); in TSAN_INTERCEPTOR()
2320 int fds[64]; in HandleRecvmsg() local
2321 int cnt = ExtractRecvmsgFDs(msg, fds, ARRAY_SIZE(fds)); in HandleRecvmsg()
2323 FdEventCreate(thr, pc, fds[i]); in HandleRecvmsg()
H A Dtsan_platform.h975 int ExtractResolvFDs(void *state, int *fds, int nfd);
976 int ExtractRecvmsgFDs(void *msg, int *fds, int nfd);
/llvm-project-15.0.7/lldb/third_party/Python/module/pexpect-4.6/pexpect/
H A Dutils.py159 def poll_ignore_interrupts(fds, timeout=None): argument
167 for fd in fds:
/llvm-project-15.0.7/clang/test/CodeGen/X86/
H A Davx512fp16-abi.c231 struct fds { struct
237 struct fds pr52011_4(void) { in pr52011_4() argument
/llvm-project-15.0.7/lldb/source/Core/
H A DDebugger.cpp871 static inline int OpenPipe(int fds[2], std::size_t size) { in OpenPipe()
873 return _pipe(fds, size, O_BINARY); in OpenPipe()
876 return pipe(fds); in OpenPipe()
883 int fds[2] = {-1, -1}; in SetInputString() local
896 if (OpenPipe(fds, size) != 0) { in SetInputString()
902 int r = write(fds[WRITE], data, size); in SetInputString()
906 llvm::sys::Process::SafelyCloseFileDescriptor(fds[WRITE]); in SetInputString()
910 FILE *commands_file = fdopen(fds[READ], "rb"); in SetInputString()
914 fds[READ], errno); in SetInputString()
915 llvm::sys::Process::SafelyCloseFileDescriptor(fds[READ]); in SetInputString()
/llvm-project-15.0.7/compiler-rt/lib/msan/tests/
H A Dmsan_test.cpp816 pollfd fds[2]; in TEST() local
817 fds[0].fd = pipefd[0]; in TEST()
818 fds[0].events = POLLIN; in TEST()
819 fds[1].fd = pipefd[1]; in TEST()
820 fds[1].events = POLLIN; in TEST()
840 pollfd fds[2]; in TEST() local
841 fds[0].fd = pipefd[0]; in TEST()
842 fds[0].events = POLLIN; in TEST()
843 fds[1].fd = pipefd[1]; in TEST()
862 pollfd fds[2]; in TEST() local
[all …]
/llvm-project-15.0.7/compiler-rt/test/dfsan/
H A Dcustom.cpp1294 fd_set fds; in test_select() local
1296 FD_SET(0, &fds); in test_select()
1297 dfsan_set_label(i_label, &fds, sizeof(fds)); in test_select()
1299 DEFINE_AND_SAVE_ORIGINS(fds) in test_select()
1301 int ret = select(1, &fds, NULL, NULL, &t); in test_select()
1305 ASSERT_READ_ZERO_LABEL(&fds, sizeof(fds)); in test_select()
1306 ASSERT_SAVED_ORIGINS(fds) in test_select()
/llvm-project-15.0.7/compiler-rt/include/sanitizer/
H A Dnetbsd_syscall_hooks.h1121 #define __sanitizer_syscall_pre_poll(fds, nfds, timeout) \ argument
1122 __sanitizer_syscall_pre_impl_poll((long long)(fds), (long long)(nfds), \
1124 #define __sanitizer_syscall_post_poll(res, fds, nfds, timeout) \ argument
1125 __sanitizer_syscall_post_impl_poll(res, (long long)(fds), (long long)(nfds), \
2028 #define __sanitizer_syscall_pre_compat_50_pollts(fds, nfds, ts, mask) \ argument
2030 (long long)(fds), (long long)(nfds), (long long)(ts), (long long)(mask))
3695 void __sanitizer_syscall_pre_impl_poll(long long fds, long long nfds,
3697 void __sanitizer_syscall_post_impl_poll(long long res, long long fds,
4386 void __sanitizer_syscall_pre_impl_compat_50_pollts(long long fds,
4675 void __sanitizer_syscall_pre_impl___pollts50(long long fds, long long nfds,
[all …]
/llvm-project-15.0.7/compiler-rt/lib/dfsan/
H A Ddfsan_custom.cpp1440 int __dfsw_poll(struct pollfd *fds, nfds_t nfds, int timeout, in __dfsw_poll() argument
1443 int ret = poll(fds, nfds, timeout); in __dfsw_poll()
1446 dfsan_set_label(0, &fds[nfds - 1].revents, sizeof(fds[nfds - 1].revents)); in __dfsw_poll()
1454 int __dfso_poll(struct pollfd *fds, nfds_t nfds, int timeout, in __dfso_poll() argument
1459 return __dfsw_poll(fds, nfds, timeout, dfs_label, nfds_label, timeout_label, in __dfso_poll()

12