Home
last modified time | relevance | path

Searched refs:fd_t (Results 1 – 23 of 23) sorted by relevance

/llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_file.h37 fd_t fd;
58 fd_t OpenFile(const char *filename, FileAccessMode mode,
60 void CloseFile(fd_t);
63 bool ReadFromFile(fd_t fd, void *buff, uptr buff_size,
65 bool WriteToFile(fd_t fd, const void *buff, uptr buff_size,
70 explicit FileCloser(fd_t fd) : fd(fd) {} in FileCloser()
72 fd_t fd;
75 bool SupportsColoredOutput(fd_t fd);
93 const char *const envp[], fd_t stdin_fd = kInvalidFd,
94 fd_t stdout_fd = kInvalidFd, fd_t stderr_fd = kInvalidFd);
[all …]
H A Dsanitizer_posix.h31 uptr internal_close(fd_t fd);
33 uptr internal_read(fd_t fd, void *buf, uptr count);
34 uptr internal_write(fd_t fd, const void *buf, uptr count);
48 uptr internal_filesize(fd_t fd); // -1 on error.
51 uptr internal_fstat(fd_t fd, void *buf);
57 uptr internal_lseek(fd_t fd, OFF_T offset, int whence);
67 fd_t internal_spawn(const char *argv[], const char *envp[], pid_t *pid);
108 fd_t ReserveStandardFds(fd_t fd);
H A Dsanitizer_solaris.cpp91 DECLARE__REAL_AND_INTERNAL(uptr, close, fd_t fd) { in DECLARE__REAL_AND_INTERNAL()
105 DECLARE__REAL_AND_INTERNAL(uptr, read, fd_t fd, void *buf, uptr count) { in DECLARE__REAL_AND_INTERNAL()
109 DECLARE__REAL_AND_INTERNAL(uptr, write, fd_t fd, const void *buf, uptr count) { in DECLARE__REAL_AND_INTERNAL()
114 DECLARE__REAL_AND_INTERNAL(uptr, ftruncate, fd_t fd, uptr size) { in DECLARE__REAL_AND_INTERNAL()
126 DECLARE__REAL_AND_INTERNAL64(uptr, fstat, fd_t fd, void *buf) { in DECLARE__REAL_AND_INTERNAL64()
130 uptr internal_filesize(fd_t fd) { in internal_filesize()
184 DECLARE__REAL_AND_INTERNAL64(uptr, getdents, fd_t fd, struct linux_dirent *dirp, in DECLARE__REAL_AND_INTERNAL64()
189 DECLARE__REAL_AND_INTERNAL64(uptr, lseek, fd_t fd, OFF_T offset, int whence) { in DECLARE__REAL_AND_INTERNAL64()
H A Dsanitizer_libc.h64 #define kInvalidFd ((fd_t)-1)
65 #define kStdinFd ((fd_t)0)
66 #define kStdoutFd ((fd_t)1)
67 #define kStderrFd ((fd_t)2)
69 uptr internal_ftruncate(fd_t fd, uptr size);
H A Dsanitizer_posix.cpp156 fd_t OpenFile(const char *filename, FileAccessMode mode, error_t *errno_p) { in OpenFile()
165 fd_t res = internal_open(filename, flags, 0660); in OpenFile()
171 void CloseFile(fd_t fd) { in CloseFile()
175 bool ReadFromFile(fd_t fd, void *buff, uptr buff_size, uptr *bytes_read, in ReadFromFile()
185 bool WriteToFile(fd_t fd, const void *buff, uptr buff_size, uptr *bytes_written, in WriteToFile()
196 fd_t fd = OpenFile(file_name, RdOnly); in MapFileToMemory()
206 void *MapWritableFileToMemory(void *addr, uptr size, fd_t fd, OFF_T offset) { in MapWritableFileToMemory()
326 fd_t ReserveStandardFds(fd_t fd) { in ReserveStandardFds()
H A Dsanitizer_netbsd.cpp124 uptr internal_close(fd_t fd) { in internal_close()
139 uptr internal_read(fd_t fd, void *buf, uptr count) { in internal_read()
146 uptr internal_write(fd_t fd, const void *buf, uptr count) { in internal_write()
153 uptr internal_ftruncate(fd_t fd, uptr size) { in internal_ftruncate()
170 uptr internal_fstat(fd_t fd, void *buf) { in internal_fstat()
175 uptr internal_filesize(fd_t fd) { in internal_filesize()
281 uptr internal_getdents(fd_t fd, void *dirp, unsigned int count) { in internal_getdents()
286 uptr internal_lseek(fd_t fd, OFF_T offset, int whence) { in internal_lseek()
H A Dsanitizer_coverage_libcdep_new.cpp32 static fd_t OpenFile(const char* path) { in OpenFile()
34 fd_t fd = OpenFile(path, WrOnly, &err); in OpenFile()
52 fd_t fd = OpenFile(file_path); in WriteModuleCoverage()
171 fd_t fd = OpenFile(file_path); in DumpCoverage()
181 fd_t fd = OpenFile(file_path); in DumpCoverage()
H A Dsanitizer_win.cpp439 void *MapWritableFileToMemory(void *addr, uptr size, fd_t fd, OFF_T offset) { in MapWritableFileToMemory()
605 fd_t fd = OpenFile(modname, RdOnly, nullptr); in GetPreferredBase()
740 fd_t OpenFile(const char *filename, FileAccessMode mode, error_t *last_error) { in OpenFile()
742 fd_t res; in OpenFile()
760 void CloseFile(fd_t fd) { in CloseFile()
764 bool ReadFromFile(fd_t fd, void *buff, uptr buff_size, uptr *bytes_read, in ReadFromFile()
780 bool SupportsColoredOutput(fd_t fd) { in SupportsColoredOutput()
785 bool WriteToFile(fd_t fd, const void *buff, uptr buff_size, uptr *bytes_written, in WriteToFile()
835 uptr internal_ftruncate(fd_t fd, uptr size) { in internal_ftruncate()
1127 const char *const envp[], fd_t stdin_fd, fd_t stdout_fd, in StartSubprocess()
[all …]
H A Dsanitizer_mac.cpp161 uptr internal_close(fd_t fd) { in internal_close()
173 uptr internal_read(fd_t fd, void *buf, uptr count) { in internal_read()
177 uptr internal_write(fd_t fd, const void *buf, uptr count) { in internal_write()
189 uptr internal_fstat(fd_t fd, void *buf) { in internal_fstat()
193 uptr internal_filesize(fd_t fd) { in internal_filesize()
270 fd_t primary_fd = kInvalidFd; in internal_spawn_impl()
271 fd_t secondary_fd = kInvalidFd; in internal_spawn_impl()
339 fd_t fd = primary_fd; in internal_spawn_impl()
351 fd_t low_fds[3]; in internal_spawn()
360 fd_t fd = internal_spawn_impl(argv, envp, pid); in internal_spawn()
[all …]
H A Dsanitizer_symbolizer_internal.h114 fd_t input_fd_;
115 fd_t output_fd_;
H A Dsanitizer_file.cpp142 fd_t fd = OpenFile(file_name, RdOnly, errno_p); in ReadFileToBuffer()
178 fd_t fd = OpenFile(file_name, RdOnly, errno_p); in ReadFileToVector()
242 report_file.fd = (fd_t)reinterpret_cast<uptr>(fd); in __sanitizer_set_report_fd()
H A Dsanitizer_posix_libcdep.cpp156 bool SupportsColoredOutput(fd_t fd) { in SupportsColoredOutput()
423 const char *const envp[], fd_t stdin_fd, fd_t stdout_fd, in StartSubprocess()
424 fd_t stderr_fd) { in StartSubprocess()
H A Dsanitizer_internal_defs.h168 typedef void* fd_t; typedef
171 typedef int fd_t; typedef
H A Dsanitizer_linux.cpp238 uptr internal_close(fd_t fd) { in internal_close()
259 uptr internal_read(fd_t fd, void *buf, uptr count) { in internal_read()
266 uptr internal_write(fd_t fd, const void *buf, uptr count) { in internal_write()
273 uptr internal_ftruncate(fd_t fd, uptr size) { in internal_ftruncate()
433 uptr internal_fstat(fd_t fd, void *buf) { in internal_fstat()
458 uptr internal_filesize(fd_t fd) { in internal_filesize()
795 uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count) { in internal_getdents()
805 uptr internal_lseek(fd_t fd, OFF_T offset, int whence) { in internal_lseek()
H A Dsanitizer_symbolizer_posix_libcdep.cpp158 fd_t fd = internal_spawn(argv, const_cast<const char **>(GetEnvP()), &pid); in StartSymbolizerSubprocess()
171 fd_t infd[2] = {}, outfd[2] = {}; in StartSymbolizerSubprocess()
H A Dsanitizer_linux.h48 uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
H A Dsanitizer_linux_libcdep.cpp749 fd_t fd = OpenFile("/proc/self/statm", RdOnly); in GetRSS()
/llvm-project-15.0.7/compiler-rt/lib/stats/
H A Dstats.cpp33 fd_t stats_fd;
35 void WriteLE(fd_t fd, uptr val) { in WriteLE()
/llvm-project-15.0.7/compiler-rt/lib/sanitizer_common/tests/
H A Dsanitizer_libc_test.cpp119 fd_t fd = OpenFile(tmpfile, WrOnly); in TEST()
319 fd_t fd = OpenFile(tmpfile, RdWr); in TEST()
361 fd_t fd = OpenFile(tmpfile, WrOnly); in TEST()
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl/
H A Dtsan_platform_linux.cpp172 fd_t fd = openrv; in MapRodata()
H A Dtsan_rtl.h360 fd_t memprof_fd;
/llvm-project-15.0.7/compiler-rt/lib/tsan/rtl-old/
H A Dtsan_platform_linux.cpp184 fd_t fd = openrv; in MapRodata()
H A Dtsan_rtl.h320 fd_t memprof_fd;