Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 431) sorted by relevance

12345678910>>...18

/llvm-project-15.0.7/clang/test/Analysis/
H A Dunix-api.c16 int fd; in open_1() local
18 if (fd > -1) in open_1()
23 int fd; in open_2() local
31 int fd; in openat_2() local
39 int fd; in open_3() local
46 int fd; in openat_3() local
54 int fd; in open_4() local
61 int fd; in open_5() local
71 int fd; in open_6() local
81 int fd; in open_7() local
[all …]
H A Dunix-api.cpp21 int fd; in unix_open() local
22 fd = open(path, O_RDONLY); // no-warning in unix_open()
23 if (fd > -1) in unix_open()
24 close(fd); in unix_open()
28 int fd; in unix_open_misuse() local
30fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argume… in unix_open_misuse()
31 if (fd > -1) in unix_open_misuse()
32 close(fd); in unix_open_misuse()
43 int fd; in namespaced_open() local
46 if (fd > -1) in namespaced_open()
[all …]
/llvm-project-15.0.7/lldb/examples/interposing/darwin/fd_interposing/
H A DFDInterposing.cpp492 fd); in save_backtrace()
547 return fd; in socket$__interposed__()
602 return fd; in open$__interposed__()
623 return fd; in open$NOCANCEL$__interposed__()
646 return fd; in __open_extended$__interposed__()
664 return fd; in kqueue$__interposed__()
684 return fd; in shm_open$__interposed__()
704 return fd; in accept$__interposed__()
725 return fd; in accept$NOCANCEL$__interposed__()
744 return fd; in dup$__interposed__()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/
H A Dtsan_fd.cpp46 return fd < 0 || fd >= kTableSize; in bogusfd()
74 CHECK_GE(fd, 0); in fddesc()
161 if (bogusfd(fd)) in FdAcquire()
172 if (bogusfd(fd)) in FdRelease()
184 if (bogusfd(fd)) in FdAccess()
192 if (bogusfd(fd)) in FdClose()
220 if (bogusfd(fd)) in FdFileCreate()
246 if (bogusfd(fd)) in FdEventCreate()
253 if (bogusfd(fd)) in FdSignalCreate()
260 if (bogusfd(fd)) in FdInotifyCreate()
[all …]
H A Dtsan_fd.h41 void FdAcquire(ThreadState *thr, uptr pc, int fd);
42 void FdRelease(ThreadState *thr, uptr pc, int fd);
43 void FdAccess(ThreadState *thr, uptr pc, int fd);
45 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
48 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
50 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
51 void FdPollCreate(ThreadState *thr, uptr pc, int fd);
52 void FdSocketCreate(ThreadState *thr, uptr pc, int fd);
54 void FdSocketConnecting(ThreadState *thr, uptr pc, int fd);
[all …]
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/
H A Dtsan_fd.cpp52 return fd < 0 || fd >= kTableSize; in bogusfd()
80 CHECK_GE(fd, 0); in fddesc()
176 if (bogusfd(fd)) in FdAcquire()
187 if (bogusfd(fd)) in FdRelease()
201 if (bogusfd(fd)) in FdAccess()
209 if (bogusfd(fd)) in FdClose()
251 if (bogusfd(fd)) in FdFileCreate()
277 if (bogusfd(fd)) in FdEventCreate()
284 if (bogusfd(fd)) in FdSignalCreate()
291 if (bogusfd(fd)) in FdInotifyCreate()
[all …]
H A Dtsan_fd.h41 void FdAcquire(ThreadState *thr, uptr pc, int fd);
42 void FdRelease(ThreadState *thr, uptr pc, int fd);
43 void FdAccess(ThreadState *thr, uptr pc, int fd);
45 void FdFileCreate(ThreadState *thr, uptr pc, int fd);
48 void FdEventCreate(ThreadState *thr, uptr pc, int fd);
49 void FdSignalCreate(ThreadState *thr, uptr pc, int fd);
50 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd);
51 void FdPollCreate(ThreadState *thr, uptr pc, int fd);
53 void FdSocketCreate(ThreadState *thr, uptr pc, int fd);
55 void FdSocketConnecting(ThreadState *thr, uptr pc, int fd);
[all …]
/llvm-project-15.0.7/lldb/source/Utility/
H A DSelectHelper.cpp50 m_fd_map[fd].read_set = true; in FDSetRead()
54 m_fd_map[fd].write_set = true; in FDSetWrite()
58 m_fd_map[fd].error_set = true; in FDSetError()
62 auto pos = m_fd_map.find(fd); in FDIsSetRead()
70 auto pos = m_fd_map.find(fd); in FDIsSetWrite()
78 auto pos = m_fd_map.find(fd); in FDIsSetError()
118 updateMaxFd(max_read_fd, fd); in Select()
123 updateMaxFd(max_fd, fd); in Select()
182 FD_SET(fd, read_fdset_ptr); in Select()
185 FD_SET(fd, write_fdset_ptr); in Select()
[all …]
/llvm-project-15.0.7/compiler-rt/include/sanitizer/
H A Dnetbsd_syscall_hooks.h68 __sanitizer_syscall_pre_impl_close((long long)(fd))
70 __sanitizer_syscall_post_impl_close(res, (long long)(fd))
100 __sanitizer_syscall_pre_impl_fchdir((long long)(fd))
246 __sanitizer_syscall_pre_impl_dup((long long)(fd))
248 __sanitizer_syscall_post_impl_dup(res, (long long)(fd))
499 __sanitizer_syscall_pre_impl_fsync((long long)(fd))
1581 __sanitizer_syscall_pre_impl_fchroot((long long)(fd))
2894 void __sanitizer_syscall_pre_impl_close(long long fd);
3027 void __sanitizer_syscall_pre_impl_dup(long long fd);
3128 long long flags, long long fd, long long pos);
[all …]
H A Dlinux_syscall_hooks.h441 __sanitizer_syscall_pre_impl_fsync((long)(fd))
443 __sanitizer_syscall_post_impl_fsync(res, (long)(fd))
445 __sanitizer_syscall_pre_impl_fdatasync((long)(fd))
811 __sanitizer_syscall_pre_impl_close((long)(fd))
813 __sanitizer_syscall_post_impl_close(res, (long)(fd))
1028 __sanitizer_syscall_pre_impl_fchdir((long)(fd))
1772 __sanitizer_syscall_pre_impl_syncfs((long)(fd))
2266 void __sanitizer_syscall_pre_impl_fsync(long fd);
2468 void __sanitizer_syscall_pre_impl_close(long fd);
2591 void __sanitizer_syscall_pre_impl_fchdir(long fd);
[all …]
/llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_file.cpp39 if (fd == kStdoutFd || fd == kStderrFd) return; in ReopenIfNecessary()
52 CloseFile(fd); in ReopenIfNecessary()
108 if (fd != kStdoutFd && fd != kStderrFd && fd != kInvalidFd) in SetReportPath()
109 CloseFile(fd); in SetReportPath()
110 fd = kInvalidFd; in SetReportPath()
112 fd = kStderrFd; in SetReportPath()
114 fd = kStdoutFd; in SetReportPath()
164 CloseFile(fd); in ReadFileToBuffer()
190 CloseFile(fd); in ReadFileToVector()
197 CloseFile(fd); in ReadFileToVector()
[all …]
H A Dsanitizer_posix.cpp171 void CloseFile(fd_t fd) { in CloseFile() argument
172 internal_close(fd); in CloseFile()
327 CHECK_GE(fd, 0); in ReserveStandardFds()
328 if (fd > 2) in ReserveStandardFds()
329 return fd; in ReserveStandardFds()
332 while (fd <= 2) { in ReserveStandardFds()
333 used[fd] = true; in ReserveStandardFds()
334 fd = internal_dup(fd); in ReserveStandardFds()
339 return fd; in ReserveStandardFds()
361 CHECK_GE(fd, 0); in GetNamedMappingFd()
[all …]
/llvm-project-15.0.7/compiler-rt/lib/profile/
H A DInstrProfilingUtil.c156 flock(fd, LOCK_EX); in lprofLockFd()
187 int fd; in lprofLockFileHandle() local
189 fd = _fileno(F); in lprofLockFileHandle()
191 fd = fileno(F); in lprofLockFileHandle()
197 int fd; in lprofUnlockFileHandle() local
199 fd = _fileno(F); in lprofUnlockFileHandle()
201 fd = fileno(F); in lprofUnlockFileHandle()
208 int fd; in lprofOpenFileEx() local
211 if (fd < 0) in lprofOpenFileEx()
228 if (fd == -1) { in lprofOpenFileEx()
[all …]
/llvm-project-15.0.7/polly/lib/External/isl/interface/
H A Dcpp.cc104 clazz.methods[name].insert(fd); in copy_method()
166 if (!same_signature(fd, m)) in is_overridden()
184 for (auto fd : methods) { in copy_methods() local
187 if (method2class(fd)->is_static(fd)) in copy_methods()
383 if (clazz.is_get_method(fd)) in print_method_variants()
384 print_get_method(fd); in print_method_variants()
407 if (fd->getNumParams() != 2) in has_single_isl_argument()
410 param = fd->getParamDecl(1); in has_single_isl_argument()
969 clazz(clazz), fd(fd), name(rename_method(name)), in Method()
970 kind(get_kind(clazz, fd)), in Method()
[all …]
H A Dgenerator.cc98 if (fd->getNumParams() < 1) in is_mutator()
100 if (is_static(clazz, fd)) in is_mutator()
103 if (!gives(fd)) in is_mutator()
105 param = fd->getParamDecl(0); in is_mutator()
150 if (fd->getNumParams() != 2) in extract_automatic_conversion()
171 FunctionDecl *fd = *fi; in extract_class_automatic_conversions() local
254 FunctionDecl *fd) in add_set_enum() argument
292 n = fd->getNumParams(); in handled_sets_enum()
319 return fd->getParamDecl(1); in persistent_callback_arg()
350 n = fd->getNumParams(); in takes_enums()
[all …]
/llvm-project-15.0.7/compiler-rt/test/tsan/Linux/
H A Dsyscall.h26 int myclose(int fd) { in myclose() argument
27 __sanitizer_syscall_pre_close(fd); in myclose()
28 int res = syscall(SYS_close, fd); in myclose()
29 __sanitizer_syscall_post_close(res, fd); in myclose()
33 ssize_t myread(int fd, void *buf, size_t count) { in myread() argument
34 __sanitizer_syscall_pre_read(fd, buf, count); in myread()
35 ssize_t res = syscall(SYS_read, fd, buf, count); in myread()
36 __sanitizer_syscall_post_read(res, fd, buf, count); in myread()
41 __sanitizer_syscall_pre_write(fd, buf, count); in mywrite()
42 ssize_t res = syscall(SYS_write, fd, buf, count); in mywrite()
[all …]
/llvm-project-15.0.7/clang/test/Sema/
H A Dzvector.c104 fd = fd2; in foo()
230 fd++; in foo()
270 fd--; in foo()
292 fd = +fd2; in foo()
318 fd = -fd2; in foo()
393 fd = fd + fd2; in foo()
394 fd = fd + ul2; // expected-error {{cannot convert}} in foo()
431 fd += fd2; in foo()
465 fd -= fd2; in foo()
500 fd *= fd2; in foo()
[all …]
/llvm-project-15.0.7/libc/test/src/unistd/
H A Dlseek_test.cpp23 int fd = __llvm_libc::open(TEST_FILE, O_RDONLY); in TEST() local
25 ASSERT_GT(fd, 0); in TEST()
30 ASSERT_THAT(__llvm_libc::read(fd, read_buf, LSEEK_TEST_SIZE), in TEST()
36 ASSERT_THAT(__llvm_libc::lseek(fd, 0, SEEK_SET), Succeeds(0)); in TEST()
37 ASSERT_THAT(__llvm_libc::read(fd, read_buf, LSEEK_TEST_SIZE), in TEST()
44 ASSERT_THAT(__llvm_libc::read(fd, read_buf, LSEEK_TEST_SIZE), in TEST()
49 ASSERT_THAT(__llvm_libc::close(fd), Succeeds(0)); in TEST()
56 int fd = __llvm_libc::open(TEST_FILE, O_RDONLY); in TEST() local
58 ASSERT_GT(fd, 0); in TEST()
59 EXPECT_THAT(__llvm_libc::lseek(fd, -1, SEEK_CUR), Fails(EINVAL)); in TEST()
[all …]
/llvm-project-15.0.7/lldb/source/Host/common/
H A DFileCache.cpp38 lldb::user_id_t fd = file.get()->GetDescriptor(); in OpenFile() local
39 m_cache[fd] = std::move(file.get()); in OpenFile()
40 return fd; in OpenFile()
43 bool FileCache::CloseFile(lldb::user_id_t fd, Status &error) { in CloseFile() argument
44 if (fd == UINT64_MAX) { in CloseFile()
48 FDToFileMap::iterator pos = m_cache.find(fd); in CloseFile()
63 uint64_t FileCache::WriteFile(lldb::user_id_t fd, uint64_t offset, in WriteFile() argument
66 if (fd == UINT64_MAX) { in WriteFile()
70 FDToFileMap::iterator pos = m_cache.find(fd); in WriteFile()
92 if (fd == UINT64_MAX) { in ReadFile()
[all …]
/llvm-project-15.0.7/lldb/source/Host/posix/
H A DProcessLauncherPosixFork.cpp79 if (target_fd == fd) in DupDescriptor()
82 if (::dup2(target_fd, fd) == -1) in DupDescriptor()
93 int fd; member
109 bool has_action(int fd) const { in has_action()
111 if (action.fd == fd) in has_action()
128 if (close(action.fd) != 0) in ChildFunc()
182 if (fd > 2 && !info.has_action(fd) && fd != error_fd) in ChildFunc()
183 files_to_close.push_back(fd); in ChildFunc()
190 for (int fd = 3; fd < max_fd; ++fd) in ChildFunc() local
191 if (!info.has_action(fd) && fd != error_fd) in ChildFunc()
[all …]
/llvm-project-15.0.7/llvm/lib/Target/LoongArch/
H A DLoongArchFloatInstrFormats.td20 // <opcode | fj | fd>
25 bits<5> fd;
29 let Inst{4-0} = fd;
39 bits<5> fd;
44 let Inst{4-0} = fd;
55 bits<5> fd;
61 let Inst{4-0} = fd;
71 bits<5> fd;
119 bits<5> fd;
148 bits<5> fd;
[all …]
/llvm-project-15.0.7/lldb/unittests/Host/
H A DFileTest.cpp24 int fd; in TEST() local
27 "test", fd, name); in TEST()
29 ASSERT_GE(fd, 0); in TEST()
31 FILE *stream = fdopen(fd, "r"); in TEST()
35 EXPECT_EQ(file.GetWaitableHandle(), fd); in TEST()
41 int fd; in TEST() local
44 "test", fd, name); in TEST()
47 ASSERT_GE(fd, 0); in TEST()
49 NativeFile file(fd, File::eOpenOptionWriteOnly, true); in TEST()
55 EXPECT_EQ(file.GetDescriptor(), fd); in TEST()
[all …]
/llvm-project-15.0.7/compiler-rt/test/sanitizer_common/TestCases/NetBSD/
H A Dpaccept.cpp12 int fd, sfd; in main() local
19 fd = socket(AF_INET, SOCK_STREAM, 0); in main()
20 if (fd == -1) in main()
27 if (connect(fd, (struct sockaddr *)&server, sizeof(server)) == -1) in main()
30 close(fd); in main()
35 fd = socket(AF_INET, SOCK_STREAM, 0); in main()
36 if (fd == -1) { in main()
46 if (bind(fd, (const struct sockaddr *)&server, sizeof(server)) == -1) { in main()
52 listen(fd, 3); in main()
61 sfd = paccept(fd, (struct sockaddr *)&client, &len, &set, SOCK_NONBLOCK); in main()
[all …]
/llvm-project-15.0.7/clang/tools/scan-build-py/tests/functional/exec/
H A Dmain.c37 static FILE *fd = NULL; variable
43 if (!fd) { in expected_out_open()
47 fprintf(fd, "[\n"); in expected_out_open()
52 fprintf(fd, "]\n"); in expected_out_close()
53 fclose(fd); in expected_out_close()
54 fd = NULL; in expected_out_close()
62 fprintf(fd, ",\n"); in expected_out()
66 fprintf(fd, "{\n"); in expected_out()
70 fprintf(fd, "}\n"); in expected_out()
75 if (!fd) { in create_source()
[all …]
/llvm-project-15.0.7/libc/src/__support/File/
H A Dlinux_dir.cpp22 int fd = __llvm_libc::syscall(SYS_open, name, open_flags); in platform_opendir() local
24 int fd = __llvm_libc::syscall(SYS_openat, AT_FDCWD, name, open_flags); in platform_opendir() local
30 if (fd < 0) { in platform_opendir()
31 errno = -fd; in platform_opendir()
34 return fd; in platform_opendir()
37 size_t platform_fetch_dirents(int fd, cpp::MutableArrayRef<uint8_t> buffer) { in platform_fetch_dirents() argument
39 __llvm_libc::syscall(SYS_getdents, fd, buffer.data(), buffer.size()); in platform_fetch_dirents()
47 bool platform_closedir(int fd) { in platform_closedir() argument
48 long ret = __llvm_libc::syscall(SYS_close, fd); in platform_closedir()

12345678910>>...18