/art/libartbase/base/ |
D | file_magic.cc | 34 File fd(filename, O_RDONLY, /* check_usage= */ false); in OpenAndReadMagic() local 35 if (fd.Fd() == -1) { in OpenAndReadMagic() 39 if (!ReadMagicAndReset(fd.Fd(), magic, error_msg)) { in OpenAndReadMagic() 43 return fd; in OpenAndReadMagic() 46 bool ReadMagicAndReset(int fd, uint32_t* magic, std::string* error_msg) { in ReadMagicAndReset() argument 47 int n = TEMP_FAILURE_RETRY(read(fd, magic, sizeof(*magic))); in ReadMagicAndReset() 52 if (lseek(fd, 0, SEEK_SET) != 0) { in ReadMagicAndReset()
|
D | memfd_test.cc | 23 int fd = art::memfd_create("memfd_create_test", 0); in TEST() local 24 if (fd < 0) { in TEST() 29 ASSERT_TRUE(close(fd) == 0 || errno != EBADF); in TEST()
|
D | zip_archive.cc | 205 static void SetCloseOnExec(int fd) { in SetCloseOnExec() argument 208 UNUSED(fd); in SetCloseOnExec() 212 int flags = fcntl(fd, F_GETFD); in SetCloseOnExec() 214 PLOG(WARNING) << "fcntl(" << fd << ", F_GETFD) failed"; in SetCloseOnExec() 217 int rc = fcntl(fd, F_SETFD, flags | FD_CLOEXEC); in SetCloseOnExec() 219 PLOG(WARNING) << "fcntl(" << fd << ", F_SETFD, " << flags << ") failed"; in SetCloseOnExec() 240 ZipArchive* ZipArchive::OpenFromFd(int fd, const char* filename, std::string* error_msg) { in OpenFromFd() argument 242 DCHECK_GT(fd, 0); in OpenFromFd() 245 const int32_t error = OpenArchiveFd(fd, filename, &handle); in OpenFromFd()
|
D | scoped_flock.h | 57 static ScopedFlock DupOf(const int fd, const std::string& path, 71 LockedFile(int fd, const std::string& path, bool check_usage, bool read_only_mode) in LockedFile() argument 72 : FdFile(fd, path, check_usage, read_only_mode) { in LockedFile()
|
D | mem_map_unix.cc | 27 void* MemMap::TargetMMap(void* start, size_t len, int prot, int flags, int fd, off_t fd_off) { in TargetMMap() argument 28 return mmap(start, len, prot, flags, fd, fd_off); in TargetMMap()
|
D | mem_map.h | 184 int fd, in MapFile() argument 193 fd, in MapFile() 218 int fd, 283 int fd, 348 int fd, 355 int fd, 399 int fd, 404 static void* TargetMMap(void* start, size_t len, int prot, int flags, int fd, off_t fd_off);
|
D | socket_peer_is_trusted.cc | 30 bool SocketPeerIsTrusted(int fd) { in SocketPeerIsTrusted() argument 33 if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &cr, &cr_length) != 0) { in SocketPeerIsTrusted()
|
D | zip_archive_test.cc | 53 int fd = open(tmp.GetFilename().c_str(), O_RDONLY | O_CLOEXEC); in TEST_F() local 54 ASSERT_NE(-1, fd); in TEST_F() 58 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buf, kBufSize)); in TEST_F()
|
D | scoped_flock.cc | 103 ScopedFlock LockedFile::DupOf(const int fd, const std::string& path, in DupOf() argument 107 UNUSED(fd); in DupOf() 119 new LockedFile(DupCloexec(fd), path, /* check_usage= */ false, read_only_mode)); in DupOf()
|
D | mem_map_windows.cc | 45 void* MemMap::TargetMMap(void* start, size_t len, int prot, int flags, int fd, off_t fd_off) { in TargetMMap() argument 88 HANDLE file_handle = reinterpret_cast<HANDLE>(_get_osfhandle(fd)); in TargetMMap() 101 HANDLE handle = ::CreateFileMapping(reinterpret_cast<HANDLE>(_get_osfhandle(fd)), in TargetMMap()
|
/art/openjdkjvm/ |
D | OpenjdkJvm.cc | 81 int fd = TEMP_FAILURE_RETRY(open(fname, flags & ~JVM_O_DELETE, mode)); in JVM_Open() local 82 if (fd < 0) { in JVM_Open() 91 return fd; in JVM_Open() 95 JNIEXPORT jint JVM_Close(jint fd) { in JVM_Close() argument 97 return close(fd); in JVM_Close() 101 JNIEXPORT jint JVM_Read(jint fd, char* buf, jint nbytes) { in JVM_Read() argument 102 return TEMP_FAILURE_RETRY(read(fd, buf, nbytes)); in JVM_Read() 106 JNIEXPORT jint JVM_Write(jint fd, char* buf, jint nbytes) { in JVM_Write() argument 107 return TEMP_FAILURE_RETRY(write(fd, buf, nbytes)); in JVM_Write() 111 JNIEXPORT jlong JVM_Lseek(jint fd, jlong offset, jint whence) { in JVM_Lseek() argument [all …]
|
/art/runtime/jdwp/ |
D | jdwp_adb.cc | 350 int fd; in ProcessIncoming() local 355 fd = ControlSock(); in ProcessIncoming() 356 if (fd >= 0) { in ProcessIncoming() 357 FD_SET(fd, &readfds); in ProcessIncoming() 358 if (maxfd < fd) { in ProcessIncoming() 359 maxfd = fd; in ProcessIncoming() 362 fd = clientSock; in ProcessIncoming() 363 if (fd >= 0) { in ProcessIncoming() 364 FD_SET(fd, &readfds); in ProcessIncoming() 365 if (maxfd < fd) { in ProcessIncoming() [all …]
|
D | jdwp_socket.cc | 202 static int SetNoDelay(int fd) { in SetNoDelay() argument 204 int cc = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); in SetNoDelay() 390 int fd; in ProcessIncoming() local 395 fd = listenSock; in ProcessIncoming() 396 if (fd >= 0) { in ProcessIncoming() 397 FD_SET(fd, &readfds); in ProcessIncoming() 398 if (maxfd < fd) { in ProcessIncoming() 399 maxfd = fd; in ProcessIncoming() 402 fd = clientSock; in ProcessIncoming() 403 if (fd >= 0) { in ProcessIncoming() [all …]
|
/art/libdexfile/dex/ |
D | art_dex_file_loader.cc | 95 File fd; in GetMultiDexChecksums() local 98 fd = File(DupCloexec(zip_fd), /* check_usage= */ false); in GetMultiDexChecksums() 101 fd = OpenAndReadMagic(filename, &magic, error_msg); in GetMultiDexChecksums() 103 if (fd.Fd() == -1) { in GetMultiDexChecksums() 109 ZipArchive::OpenFromFd(fd.Release(), filename, error_msg)); in GetMultiDexChecksums() 143 std::unique_ptr<const DexFile> dex_file(OpenFile(fd.Release(), in GetMultiDexChecksums() 230 File fd = OpenAndReadMagic(filename, &magic, error_msg); in Open() local 231 if (fd.Fd() == -1) { in Open() 236 magic, fd.Release(), location, verify, verify_checksum, error_msg, dex_files); in Open() 239 bool ArtDexFileLoader::Open(int fd, in Open() argument [all …]
|
D | art_dex_file_loader.h | 83 bool Open(int fd, 91 std::unique_ptr<const DexFile> OpenDex(int fd, 99 bool OpenZip(int fd, 108 int fd, 115 std::unique_ptr<const DexFile> OpenFile(int fd,
|
/art/libartbase/base/unix_file/ |
D | fd_file.cc | 70 static ssize_t pread(int fd, void* data, size_t byte_count, off64_t offset) { in pread() argument 78 auto handle = reinterpret_cast<HANDLE>(_get_osfhandle(fd)); in pread() 99 static ssize_t pwrite(int fd, const void* buf, size_t count, off64_t offset) { in pwrite() argument 107 auto handle = reinterpret_cast<HANDLE>(_get_osfhandle(fd)); in pwrite() 128 static int fsync(int fd) { in fsync() argument 129 auto handle = reinterpret_cast<HANDLE>(_get_osfhandle(fd)); in fsync() 145 FdFile::FdFile(int fd, bool check_usage) in FdFile() argument 146 : FdFile(fd, std::string(), check_usage) {} in FdFile() 148 FdFile::FdFile(int fd, const std::string& path, bool check_usage) in FdFile() argument 149 : FdFile(fd, path, check_usage, false) {} in FdFile() [all …]
|
D | fd_file.h | 40 FdFile(int fd, bool check_usage); 41 FdFile(int fd, const std::string& path, bool check_usage); 42 FdFile(int fd, const std::string& path, bool check_usage, bool read_only_mode); 58 void Reset(int fd, bool check_usage);
|
/art/libdexfile/external/ |
D | dex_file_supp_test.cc | 139 ASSERT_NE(tf.fd, -1); in TEST() 142 TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(art::DexFile::Header) - 1)))); in TEST() 145 EXPECT_EQ(DexFile::OpenFromFd(tf.fd, 0, tf.path, &error_msg), nullptr); in TEST() 151 ASSERT_NE(tf.fd, -1); in TEST() 154 TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(art::DexFile::Header))))); in TEST() 157 EXPECT_EQ(DexFile::OpenFromFd(tf.fd, 0, tf.path, &error_msg), nullptr); in TEST() 163 ASSERT_NE(tf.fd, -1); in TEST() 165 static_cast<size_t>(TEMP_FAILURE_RETRY(write(tf.fd, kDexData, sizeof(kDexData))))); in TEST() 168 EXPECT_NE(DexFile::OpenFromFd(tf.fd, 0, tf.path, &error_msg), nullptr); in TEST() 174 ASSERT_NE(tf.fd, -1); in TEST() [all …]
|
/art/compiler/utils/mips64/ |
D | assembler_mips64.cc | 164 void Mips64Assembler::EmitFR(int opcode, int fmt, FpuRegister ft, FpuRegister fs, FpuRegister fd, in EmitFR() argument 168 CHECK_NE(fd, kNoFpuRegister); in EmitFR() 173 static_cast<uint32_t>(fd) << kFdShift | in EmitFR() 977 void Mips64Assembler::AddS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in AddS() argument 978 EmitFR(0x11, 0x10, ft, fs, fd, 0x0); in AddS() 981 void Mips64Assembler::SubS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in SubS() argument 982 EmitFR(0x11, 0x10, ft, fs, fd, 0x1); in SubS() 985 void Mips64Assembler::MulS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in MulS() argument 986 EmitFR(0x11, 0x10, ft, fs, fd, 0x2); in MulS() 989 void Mips64Assembler::DivS(FpuRegister fd, FpuRegister fs, FpuRegister ft) { in DivS() argument [all …]
|
D | assembler_mips64.h | 580 void AddS(FpuRegister fd, FpuRegister fs, FpuRegister ft); 581 void SubS(FpuRegister fd, FpuRegister fs, FpuRegister ft); 582 void MulS(FpuRegister fd, FpuRegister fs, FpuRegister ft); 583 void DivS(FpuRegister fd, FpuRegister fs, FpuRegister ft); 584 void AddD(FpuRegister fd, FpuRegister fs, FpuRegister ft); 585 void SubD(FpuRegister fd, FpuRegister fs, FpuRegister ft); 586 void MulD(FpuRegister fd, FpuRegister fs, FpuRegister ft); 587 void DivD(FpuRegister fd, FpuRegister fs, FpuRegister ft); 588 void SqrtS(FpuRegister fd, FpuRegister fs); 589 void SqrtD(FpuRegister fd, FpuRegister fs); [all …]
|
/art/compiler/utils/mips/ |
D | assembler_mips.cc | 306 FRegister fd, in EmitFR() argument 310 CHECK_NE(fd, kNoFRegister); in EmitFR() 315 static_cast<uint32_t>(fd) << kFdShift | in EmitFR() 1226 void MipsAssembler::AddS(FRegister fd, FRegister fs, FRegister ft) { in AddS() argument 1227 DsFsmInstr(EmitFR(0x11, 0x10, ft, fs, fd, 0x0)).FprOuts(fd).FprIns(fs, ft); in AddS() 1230 void MipsAssembler::SubS(FRegister fd, FRegister fs, FRegister ft) { in SubS() argument 1231 DsFsmInstr(EmitFR(0x11, 0x10, ft, fs, fd, 0x1)).FprOuts(fd).FprIns(fs, ft); in SubS() 1234 void MipsAssembler::MulS(FRegister fd, FRegister fs, FRegister ft) { in MulS() argument 1235 DsFsmInstr(EmitFR(0x11, 0x10, ft, fs, fd, 0x2)).FprOuts(fd).FprIns(fs, ft); in MulS() 1238 void MipsAssembler::DivS(FRegister fd, FRegister fs, FRegister ft) { in DivS() argument [all …]
|
D | assembler_mips.h | 439 void AddS(FRegister fd, FRegister fs, FRegister ft); 440 void SubS(FRegister fd, FRegister fs, FRegister ft); 441 void MulS(FRegister fd, FRegister fs, FRegister ft); 442 void DivS(FRegister fd, FRegister fs, FRegister ft); 443 void AddD(FRegister fd, FRegister fs, FRegister ft); 444 void SubD(FRegister fd, FRegister fs, FRegister ft); 445 void MulD(FRegister fd, FRegister fs, FRegister ft); 446 void DivD(FRegister fd, FRegister fs, FRegister ft); 447 void SqrtS(FRegister fd, FRegister fs); 448 void SqrtD(FRegister fd, FRegister fs); [all …]
|
/art/runtime/ |
D | monitor_android.cc | 46 int fd = open("/proc/self/cmdline", O_RDONLY | O_CLOEXEC); in LogContentionEvent() local 49 read(fd, procName, sizeof(procName) - 1); in LogContentionEvent() 50 close(fd); in LogContentionEvent()
|
/art/profman/ |
D | profman.cc | 73 static bool FdIsValid(int fd) { in FdIsValid() argument 74 return fd != kInvalidFd; in FdIsValid() 515 std::unique_ptr<const ProfileCompilationInfo> LoadProfile(const std::string& filename, int fd) { in LoadProfile() argument 522 fd = open(filename.c_str(), flags); in LoadProfile() 523 if (fd < 0) { in LoadProfile() 529 if (!info->Load(fd)) { in LoadProfile() 530 LOG(ERROR) << "Cannot load profile info from fd=" << fd << "\n"; in LoadProfile() 538 int fd, in DumpOneProfile() argument 541 std::unique_ptr<const ProfileCompilationInfo> info(LoadProfile(filename, fd)); in DumpOneProfile() 543 LOG(ERROR) << "Cannot load profile info from filename=" << filename << " fd=" << fd; in DumpOneProfile() [all …]
|
/art/dt_fd_forward/ |
D | dt_fd_forward.cc | 106 static void SendListenMessage(const android::base::unique_fd& fd) { in SendListenMessage() argument 107 TEMP_FAILURE_RETRY(send(fd, kListenStartMessage, sizeof(kListenStartMessage), MSG_EOR)); in SendListenMessage() 111 static int DupCloexec(int fd) { in DupCloexec() argument 113 return fcntl(fd, F_DUPFD_CLOEXEC, 0); in DupCloexec() 115 return dup(fd); in DupCloexec() 131 static void SendListenEndMessage(const android::base::unique_fd& fd) { in SendListenEndMessage() argument 132 TEMP_FAILURE_RETRY(send(fd, kListenEndMessage, sizeof(kListenEndMessage), MSG_EOR)); in SendListenEndMessage() 247 explicit ScopedEventFdLock(const android::base::unique_fd& fd) : fd_(fd), data_(0) { in ScopedEventFdLock() argument 286 static void SendAcceptMessage(int fd) { in SendAcceptMessage() argument 287 TEMP_FAILURE_RETRY(send(fd, kAcceptMessage, sizeof(kAcceptMessage), MSG_EOR)); in SendAcceptMessage() [all …]
|