/arkcompiler/ets_runtime/ecmascript/platform/unix/ |
H A D | file.cpp | 79 void DPrintf(fd_t fd, const std::string &buffer) in DPrintf() argument 81 int ret = dprintf(fd, "%s", buffer.c_str()); in DPrintf() 83 LOG_ECMA(DEBUG) << "dprintf fd(" << fd << ") failed"; in DPrintf() 87 void FSync(fd_t fd) in FSync() argument 89 int ret = fsync(fd); in FSync() 91 LOG_ECMA(DEBUG) << "fsync fd(" << fd << ") failed"; in FSync() 95 void Close(fd_t fd) in Close() argument 97 close(fd); in Close() 102 fd_t fd = open(fileName, flag); FileMap() local 123 fd_t fd = open(fileName, flag); FileMapForAlignAddress() local [all...] |
/arkcompiler/ets_runtime/ecmascript/ohos/ |
H A D | code_decrypt.cpp | 23 int DecryptSetKey(int fd, int srcAppId) in DecryptSetKey() argument 30 return ioctl(fd, CODE_DECRYPT_CMD_SET_KEY, &arg); in DecryptSetKey() 33 int DecrypRemoveKey(int fd, int srcAppId) in DecrypRemoveKey() argument 40 return ioctl(fd, CODE_DECRYPT_CMD_REMOVE_KEY, &arg); in DecrypRemoveKey() 43 int DecryptAssociateKey(int fd, int dstAppId, int srcAppId) in DecryptAssociateKey() argument 50 return ioctl(fd, CODE_DECRYPT_CMD_SET_ASSOCIATE_KEY, &arg); in DecryptAssociateKey() 53 int DecrypRemoveAssociateKey(int fd, int dstAppId, int srcAppId) in DecrypRemoveAssociateKey() argument 60 return ioctl(fd, CODE_DECRYPT_CMD_REMOVE_ASSOCIATE_KEY, &arg); in DecrypRemoveAssociateKey()
|
H A D | code_decrypt.h | 41 int PUBLIC_API DecryptSetKey(int fd, int srcAppId); 42 int PUBLIC_API DecrypRemoveKey(int fd, int srcAppId); 43 int PUBLIC_API DecryptAssociateKey(int fd, int dstAppId, int srcAppId); 44 int DecrypRemoveAssociateKey(int fd, int dstAppId, int srcAppId);
|
H A D | ohos_pkg_args.h | 98 void DecryptSetKey(int fd) const in DecryptSetKey() 100 if (ohos::DecryptSetKey(fd, static_cast<int>(GetBundleUid())) < 0) { in DecryptSetKey() 103 if (ohos::DecryptAssociateKey(fd, static_cast<int>(GetProcessUid()), in DecryptSetKey() 109 void DecryptRemoveKey(int fd) const in DecryptRemoveKey() 111 if (ohos::DecrypRemoveKey(fd, static_cast<int>(GetProcessUid())) < 0 in DecryptRemoveKey() 112 || ohos::DecrypRemoveKey(fd, static_cast<int>(GetBundleUid())) < 0) { in DecryptRemoveKey() 142 int fd = open(DEV_APP_CRYPTO_PATH, O_RDONLY); in GetJSPandaFile() local 144 DecryptSetKey(fd); in GetJSPandaFile() 153 close(fd); in GetJSPandaFile() 170 DecryptRemoveKey(fd); in GetJSPandaFile() [all...] |
/arkcompiler/runtime_core/static_core/dprof/libdprof/dprof/ipc/ |
H A D | ipc_message.cpp | 21 bool SendMessage(int fd, const Message &message) in SendMessage() argument 24 if (!SendAll(fd, &messageId, sizeof(messageId))) { in SendMessage() 30 if (!SendAll(fd, &size, sizeof(size))) { in SendMessage() 35 if (size != 0 && !SendAll(fd, message.GetData(), message.GetSize())) { in SendMessage() 43 int RecvMessage(int fd, Message &message) in RecvMessage() argument 48 int ret = RecvTimeout(fd, &messageId, sizeof(messageId), DEFAULT_TIMEOUT); in RecvMessage() 59 if (RecvTimeout(fd, &size, sizeof(size), DEFAULT_TIMEOUT) <= 0) { in RecvMessage() 71 if (RecvTimeout(fd, data.data(), data.size(), DEFAULT_TIMEOUT) <= 0) { in RecvMessage()
|
H A D | ipc_unix_socket.cpp | 93 bool SendAll(int fd, const void *buf, int len) in SendAll() argument 99 int n = PANDA_FAILURE_RETRY(::send(fd, p + total, len, 0)); in SendAll() 110 bool WaitDataTimeout(int fd, int timeoutMs) in WaitDataTimeout() argument 113 pfd.fd = fd; in WaitDataTimeout() 136 int RecvTimeout(int fd, void *buf, int len, int timeoutMs) in RecvTimeout() argument 138 if (!WaitDataTimeout(fd, timeoutMs)) { in RecvTimeout() 143 int n = PANDA_FAILURE_RETRY(::recv(fd, buf, len, 0)); in RecvTimeout()
|
H A D | ipc_unix_socket.h | 25 bool WaitDataTimeout(int fd, int timeoutMs); 26 bool SendAll(int fd, const void *buf, int len); 27 int RecvTimeout(int fd, void *buf, int len, int timeoutMs);
|
/arkcompiler/runtime_core/libpandabase/os/ |
H A D | unique_fd.h | 36 explicit UniqueFd(int fd = -1) noexcept 38 Reset(fd); variable 62 int fd = fd_; variable 64 return fd; 87 static void DefaultCloser(int fd) in DefaultCloser() argument 89 LOG_IF(PANDA_FAILURE_RETRY(::close(fd)) != 0, FATAL, COMMON) << "Incorrect fd: " << fd; in DefaultCloser() local
|
/arkcompiler/runtime_core/static_core/libpandabase/os/ |
H A D | unique_fd.h | 36 explicit UniqueFd(int fd = -1) noexcept 38 Reset(fd); variable 62 int fd = fd_; variable 64 return fd; 87 static void DefaultCloser(int fd) in DefaultCloser() argument 89 LOG_IF(PANDA_FAILURE_RETRY(::close(fd)) != 0, FATAL, COMMON) << "Incorrect fd: " << fd; in DefaultCloser() local
|
/arkcompiler/ets_runtime/ecmascript/platform/windows/ |
H A D | file.cpp | 78 void DPrintf(fd_t fd, const std::string &buffer) in DPrintf() argument 80 LOG_ECMA(DEBUG) << "Unsupport dprintf fd(" << fd << ") in windows, buffer:" << buffer; in DPrintf() 83 void FSync(fd_t fd) in FSync() argument 85 LOG_ECMA(DEBUG) << "Unsupport fsync fd(" << fd << ") in windows"; in FSync() 88 void Close(fd_t fd) in Close() argument 90 CloseHandle(fd); in Close() 98 fd_t fd = CreateFile(fileName, flag, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); in FileMap() local 99 if (fd in FileMap() [all...] |
/arkcompiler/runtime_core/static_core/runtime/profilesaver/ |
H A D | profile_dump_info.cpp | 45 static bool WriteBuffer(int fd, const uint8_t *buffer, size_t byteCount) in WriteBuffer() argument 48 int bytesWritten = write(fd, buffer, byteCount); // real place to write in WriteBuffer() 80 static int testEOF(int fd) in testEOF() argument 84 return read(fd, buffer, 1); in testEOF() 94 ProfileDumpInfo::ProfileLoadSatus ProfileDumpInfo::SerializerBuffer::FillFromFd(int fd, const PandaString &source, in FillFromFd() argument 100 int bytesRead = read(fd, buffer, byteCount); in FillFromFd() 290 bool ProfileDumpInfo::Save(int fd) in Save() argument 292 ASSERT(fd >= 0); in Save() 298 WriteBuffer(fd, kProfileMagic, sizeof(kProfileMagic)); in Save() 299 WriteBuffer(fd, kProfileVersio in Save() 347 Load(int fd) Load() argument 359 LoadInternal(int fd, PandaString *error) LoadInternal() argument 408 ReadProfileHeader(int fd, uint32_t *numberOfLines, PandaString *error) ReadProfileHeader() argument 433 ReadProfileLineHeader(int fd, ProfileLineHeader *lineHeader, PandaString *error) ReadProfileLineHeader() argument 462 ReadProfileLine(int fd, const ProfileLineHeader &lineHeader, PandaString *error) ReadProfileLine() argument 513 Save(const PandaString &filename, uint64_t *bytesWritten, int fd) Save() argument 536 int fd = myfile.GetFd(); MergeAndSave() local [all...] |
H A D | profile_dump_info.h | 128 bool Save(int fd); 133 bool Load(int fd); 202 ProfileLoadSatus FillFromFd(int fd, const PandaString &source, PandaString *error); 269 ProfileLoadSatus LoadInternal(int fd, PandaString *error); 270 ProfileLoadSatus ReadProfileHeader(int fd, uint32_t *numberOfLines, PandaString *error); 271 ProfileLoadSatus ReadProfileLineHeader(int fd, ProfileLineHeader *lineHeader, PandaString *error); 272 ProfileLoadSatus ReadProfileLine(int fd, const ProfileLineHeader &lineHeader, PandaString *error); 281 bool Save(const PandaString &filename, uint64_t *bytesWritten, int fd);
|
/arkcompiler/ets_runtime/ecmascript/ohos/tests/mock/ |
H A D | mock_aot_runtime_info.cpp | 63 int fd = open(realOutPath, O_WRONLY | O_CREAT | O_TRUNC, 0666); in SetRuntimeInfo() local 64 if (fd == -1) { in SetRuntimeInfo() 69 write(fd, lines[i], strlen(lines[i])); in SetRuntimeInfo() 73 write(fd, buffer, strlen(buffer)); in SetRuntimeInfo() 76 write(fd, "\n", 1); in SetRuntimeInfo() 79 close(fd); in SetRuntimeInfo()
|
/arkcompiler/runtime_core/libpandabase/tests/ |
H A D | unix_native_stack_test.cpp | 31 int fd = open("./test_native_stack.txt", O_WRONLY|O_APPEND|O_CREAT, 0777); in HWTEST() local 32 ASSERT_NE(fd, -1); in HWTEST() 35 ASSERT_TRUE(os::native_stack::WriterOsFile(reinterpret_cast<void *>(buff), static_cast<size_t>(strlen(buff)), fd)); in HWTEST() 42 close(fd); in HWTEST()
|
/arkcompiler/runtime_core/static_core/runtime/tooling/sampler/ |
H A D | thread_communicator.h | 44 for (int fd : listenerPipe_) { in ~ThreadCommunicator() 45 if (fd != -1) { in ~ThreadCommunicator() 46 LOG_IF(PANDA_FAILURE_RETRY(::close(fd)) != 0, FATAL, PROFILER) << "Cannot close fd: " << fd; in ~ThreadCommunicator() local
|
/arkcompiler/ets_runtime/ecmascript/dfx/dump_code/ |
H A D | jit_dump_elf.cpp | 162 void JsJitDumpElf::SetFileOffset(int fd, uint64 offset) in SetFileOffset() argument 164 lseek(fd, offset, SEEK_SET); in SetFileOffset() 167 void JsJitDumpElf::WriteJitElfFile(int fd) in WriteJitElfFile() argument 174 (void)write(fd, reinterpret_cast<const char *>(&header), sizeof(header)); in WriteJitElfFile() 180 SetFileOffset(fd, section->GetOffset()); in WriteJitElfFile() 181 section->WriteSection(fd); in WriteJitElfFile() 183 SetFileOffset(fd, header.e_shoff); in WriteJitElfFile() 186 (void)write(fd, §ion->GetSectionHeader(), sizeof(section->GetSectionHeader())); in WriteJitElfFile()
|
H A D | jit_dump_elf.h | 53 virtual void WriteSection(int fd) = 0; 168 void WriteSection(int fd) override 170 (void)write(fd, reinterpret_cast<const char *>(relas.data()), relas.size() * sizeof(maplebe::Rela)); 200 void WriteSection(int fd) override 202 (void)write(fd, reinterpret_cast<const char *>(symbols.data()), symbols.size() * sizeof(maplebe::Symbol)); 263 virtual void WriteSection(int fd) override 265 (void)write(fd, reinterpret_cast<const char *>(data.data()), data.size()); 334 void SetFileOffset(int fd, uint64 offset); 337 void WriteJitElfFile(int fd);
|
/arkcompiler/ets_runtime/test/jsperftest/ |
H A D | prerun_proc.py | 94 fd = os.open(script_name, os.O_RDWR | os.O_CREAT, status.st_mode) 95 with os.fdopen(fd, 'r') as script_file: 104 fd = os.open(script_name, os.O_RDWR | os.O_CREAT, status.st_mode) 105 with os.fdopen(fd, 'w') as script_file:
|
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/tests/ |
H A D | heap_tracker_third_test.cpp | 222 int32_t fd = -1; in HWTEST_F_L0() local 223 FileDescriptorStream testFileStream(fd); in HWTEST_F_L0() 234 fd = 5; in HWTEST_F_L0() 235 FileDescriptorStream tmpFileStream(fd); in HWTEST_F_L0() 240 close(fd); in HWTEST_F_L0() 244 fd = open(fileName.c_str(), O_RDONLY); in HWTEST_F_L0() 245 if (fd < 0) { in HWTEST_F_L0() 246 fd = open(fileName.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IROTH); in HWTEST_F_L0() 248 FileDescriptorStream fileStream(fd); in HWTEST_F_L0() 254 close(fd); in HWTEST_F_L0() [all...] |
/arkcompiler/toolchain/websocket/ |
H A D | websocket_base.cpp | 315 bool WebSocketBase::SetWebSocketTimeOut(int32_t fd, uint32_t timeoutLimit) in SetWebSocketTimeOut() argument 319 if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, in SetWebSocketTimeOut() 324 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, in SetWebSocketTimeOut() 334 bool WebSocketBase::SetWebSocketTimeOut(int32_t fd, uint32_t timeoutLimit) in SetWebSocketTimeOut() argument 338 if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) != SOCKET_SUCCESS) { in SetWebSocketTimeOut() 342 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)) != SOCKET_SUCCESS) { in SetWebSocketTimeOut() 353 int WebSocketBase::ShutdownSocket(int32_t fd) in ShutdownSocket() argument 355 return shutdown(fd, SD_BOTH); in ShutdownSocket() 359 int WebSocketBase::ShutdownSocket(int32_t fd) in ShutdownSocket() argument 361 return shutdown(fd, SHUT_RDW in ShutdownSocket() [all...] |
/arkcompiler/runtime_core/static_core/platforms/unix/libpandabase/ |
H A D | pipe.cpp | 40 int SetFdNonblocking(const UniqueFd &fd) in SetFdNonblocking() argument 45 int res = fcntl(fd.Get(), F_GETFL, 0); in SetFdNonblocking() 52 return fcntl(fd.Get(), F_SETFL, flags | O_NONBLOCK); in SetFdNonblocking() 55 return ioctl(fd, FIONBIO, &flags); in SetFdNonblocking() 92 pollfds[i].fd = handles[i].Get(); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) in WaitForEvent() 113 return Error("Source fd is invalid"); in Dup2()
|
H A D | unique_fd.h | 23 inline int DupCloexec(int fd) in DupCloexec() argument 25 return fcntl(fd, F_DUPFD_CLOEXEC, 0); in DupCloexec()
|
/arkcompiler/runtime_core/platforms/unix/libpandabase/ |
H A D | unique_fd.h | 23 inline int DupCloexec(int fd) in DupCloexec() argument 25 return fcntl(fd, F_DUPFD_CLOEXEC, 0); in DupCloexec()
|
/arkcompiler/ets_runtime/ecmascript/platform/ |
H A D | file.h | 70 void DPrintf(fd_t fd, const std::string &buffer); 71 void Close(fd_t fd); 72 void FSync(fd_t fd);
|
/arkcompiler/ets_runtime/ecmascript/extractortool/src/ |
H A D | file_mapper.cpp | 42 int32_t fd, size_t offset, size_t len, FileMapperType type) in CreateFileMapper() 44 if (fd < 0 || len == 0 || type == FileMapperType::NORMAL_MEM) { in CreateFileMapper() 62 mmapFlag, fd, adjOffset)); in CreateFileMapper() 41 CreateFileMapper(const std::string &fileName, bool compress, int32_t fd, size_t offset, size_t len, FileMapperType type) CreateFileMapper() argument
|