Home
last modified time | relevance | path

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

123

/arkcompiler/ets_runtime/ecmascript/platform/unix/
Dfile.cpp61 void DPrintf(fd_t fd, const std::string &buffer) in DPrintf() argument
63 int ret = dprintf(fd, "%s", buffer.c_str()); in DPrintf()
65 LOG_ECMA(DEBUG) << "dprintf fd(" << fd << ") failed"; in DPrintf()
69 void FSync(fd_t fd) in FSync() argument
71 int ret = fsync(fd); in FSync()
73 LOG_ECMA(DEBUG) << "fsync fd(" << fd << ") failed"; in FSync()
77 void Close(fd_t fd) in Close() argument
79 close(fd); in Close()
84 fd_t fd = open(fileName, flag); in FileMap() local
85 if (fd == INVALID_FD) { in FileMap()
[all …]
/arkcompiler/ets_runtime/ecmascript/ohos/
Dcode_decrypt.cpp23 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()
Dcode_decrypt.h38 int DecryptSetKey(int fd, int srcAppId);
39 int DecrypRemoveKey(int fd, int srcAppId);
40 int DecryptAssociateKey(int fd, int dstAppId, int srcAppId);
41 int DecrypRemoveAssociateKey(int fd, int dstAppId, int srcAppId);
/arkcompiler/runtime_core/static_core/dprof/libdprof/dprof/ipc/
Dipc_message.cpp21 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()
Dipc_unix_socket.cpp93 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()
Dipc_unix_socket.h25 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/ets_runtime/ecmascript/platform/windows/
Dfile.cpp69 void DPrintf(fd_t fd, const std::string &buffer) in DPrintf() argument
71 LOG_ECMA(DEBUG) << "Unsupport dprintf fd(" << fd << ") in windows, buffer:" << buffer; in DPrintf()
74 void FSync(fd_t fd) in FSync() argument
76 LOG_ECMA(DEBUG) << "Unsupport fsync fd(" << fd << ") in windows"; in FSync()
79 void Close(fd_t fd) in Close() argument
81 CloseHandle(fd); in Close()
89 fd_t fd = CreateFile(fileName, flag, 0, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr); in FileMap() local
90 if (fd == INVALID_FD) { in FileMap()
96 if (!GetFileSizeEx(fd, &fileSize)) { in FileMap()
97 CloseHandle(fd); in FileMap()
[all …]
/arkcompiler/runtime_core/libpandabase/os/
Dunique_fd.h36 explicit UniqueFd(int fd = -1) noexcept
38 Reset(fd);
62 int fd = fd_; in Release() local
64 return fd; in Release()
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()
/arkcompiler/runtime_core/static_core/libpandabase/os/
Dunique_fd.h36 explicit UniqueFd(int fd = -1) noexcept
38 Reset(fd);
62 int fd = fd_; in Release() local
64 return fd; in Release()
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()
/arkcompiler/runtime_core/static_core/runtime/profilesaver/
Dprofile_dump_info.cpp45 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 Panda… 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, kProfileVersion, sizeof(kProfileVersion)); in Save()
[all …]
Dprofile_dump_info.h128 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);
/arkcompiler/runtime_core/libpandabase/tests/
Dunix_native_stack_test.cpp31 int fd = open("./test_native_stack.txt", O_WRONLY|O_APPEND|O_CREAT, 0777); variable
32 ASSERT_NE(fd, -1);
35 …native_stack::WriterOsFile(reinterpret_cast<void *>(buff), static_cast<size_t>(strlen(buff)), fd));
42 close(fd);
/arkcompiler/runtime_core/static_core/runtime/tooling/sampler/
Dthread_communicator.h44 for (int fd : listenerPipe_) { in ~ThreadCommunicator() local
45 if (fd != -1) { in ~ThreadCommunicator()
46 … LOG_IF(PANDA_FAILURE_RETRY(::close(fd)) != 0, FATAL, PROFILER) << "Cannot close fd: " << fd; in ~ThreadCommunicator()
/arkcompiler/ets_runtime/ecmascript/dfx/hprof/tests/
Dheap_tracker_third_test.cpp210 int32_t fd = -1; in HWTEST_F_L0() local
211 FileDescriptorStream testFileStream(fd); in HWTEST_F_L0()
222 fd = 5; in HWTEST_F_L0()
223 FileDescriptorStream tmpFileStream(fd); in HWTEST_F_L0()
228 close(fd); in HWTEST_F_L0()
232 fd = open(fileName.c_str(), O_RDONLY); in HWTEST_F_L0()
233 if (fd < 0) { in HWTEST_F_L0()
234 fd = open(fileName.c_str(), O_RDWR | O_CREAT, S_IRWXU | S_IRWXG | S_IROTH); in HWTEST_F_L0()
236 FileDescriptorStream fileStream(fd); in HWTEST_F_L0()
242 close(fd); in HWTEST_F_L0()
/arkcompiler/runtime_core/static_core/platforms/unix/libpandabase/
Dpipe.cpp41 int SetFdNonblocking(const UniqueFd &fd) in SetFdNonblocking() argument
46 int res = fcntl(fd.Get(), F_GETFL, 0); in SetFdNonblocking()
53 return fcntl(fd.Get(), F_SETFL, flags | O_NONBLOCK); in SetFdNonblocking()
56 return ioctl(fd, FIONBIO, &flags); in SetFdNonblocking()
93 … pollfds[i].fd = handles[i].Get(); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic) in WaitForEvent()
Dunique_fd.h23 inline int DupCloexec(int fd) in DupCloexec() argument
25 return fcntl(fd, F_DUPFD_CLOEXEC, 0); in DupCloexec()
/arkcompiler/runtime_core/platforms/unix/libpandabase/
Dunique_fd.h23 inline int DupCloexec(int fd) in DupCloexec() argument
25 return fcntl(fd, F_DUPFD_CLOEXEC, 0); in DupCloexec()
/arkcompiler/toolchain/websocket/
Dwebsocket_base.cpp206 bool WebSocketBase::SetWebSocketTimeOut(int32_t fd, uint32_t timeoutLimit) in SetWebSocketTimeOut() argument
210 if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, in SetWebSocketTimeOut()
215 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, in SetWebSocketTimeOut()
225 bool WebSocketBase::SetWebSocketTimeOut(int32_t fd, uint32_t timeoutLimit) in SetWebSocketTimeOut() argument
229 if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) != SOCKET_SUCCESS) { in SetWebSocketTimeOut()
233 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)) != SOCKET_SUCCESS) { in SetWebSocketTimeOut()
/arkcompiler/ets_runtime/ecmascript/platform/
Dfile.h69 void DPrintf(fd_t fd, const std::string &buffer);
70 void Close(fd_t fd);
71 void FSync(fd_t fd);
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/06.return_type/
Dret_type.ets16 {% for fd in function_decls %}
22 {{fd.decl}}
25 {{fd.call|indent}}
Dret_type_neg.ets16 {% for fd in function_decls %}
23 {{fd.decl}}
26 {{fd.call|indent}}
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/
Dfunction_decl2.ets16 {% for fd in function_decls %}
23 {{fd.decl}}
26 {{fd.call|indent}}
Dfunction_decl_neg.ets16 {% for fd in function_decls %}
24 {{fd.decl}}
27 {{fd.call}}
Dfunction_decl.ets16 {% for fd in function_decls %}
23 {{fd.decl}}
26 {{fd.call|indent}}
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/02.parameter_list/
Dparam_list_neg.ets16 {% for fd in function_decls %}
24 {{fd.decl}}
27 {{fd.call}}

123