/developtools/hdc/src/daemon/ |
D | daemon_forward.cpp | 58 int fds[2] = { 0 }; in SetupJdwpPoint() local 60 Base::CreateSocketPair(fds); in SetupJdwpPoint() 65 if (uv_tcp_open(&ctxPoint->tcp, fds[0])) { in SetupJdwpPoint() 72 memcpy_s(flag + 1 + len, sizeof(flag) - len - 1, &fds[1], len)) { in SetupJdwpPoint() 78 WRITE_LOG(LOG_DEBUG, "SendJdwpNewFD Finish,ret:%d fd0:%d fd1:%d", ret, fds[0], fds[1]); in SetupJdwpPoint() 80 Base::CloseSocketPair(fds); in SetupJdwpPoint() 114 Base::CreateSocketPair(fds); in SetupArkPoint() 119 if (memcpy_s(buf + 1, sizeof(int32_t), &fds[1], sizeof(int32_t)) || in SetupArkPoint() 121 Base::CloseSocketPair(fds); in SetupArkPoint() 128 WRITE_LOG(LOG_DEBUG, "SetupArkPoint Finish,ret:%d fd0:%d fd1:%d", ret, fds[0], fds[1]); in SetupArkPoint() [all …]
|
/developtools/hdc/test/unittest/common/ |
D | daemon_uart_test.cpp | 95 void PrepareDeamonReadThreadData(std::vector<uint8_t> &data, int fds[PAIR]) in PrepareDeamonReadThreadData() 101 ASSERT_EQ(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, fds), 0); in PrepareDeamonReadThreadData() 108 mockDaemonUART.uartHandle = fds[RECEIVER]; in PrepareDeamonReadThreadData() 443 int fds[PAIR]; variable 446 PrepareDeamonReadThreadData(data, fds); 452 MockUartDevSender(fds[SENDER], data.data(), data.size(), 0ms, true); 456 close(fds[SENDER]); 457 close(fds[RECEIVER]); 469 int fds[PAIR]; variable 472 PrepareDeamonReadThreadData(data, fds); [all …]
|
/developtools/hdc/src/common/ |
D | async_cmd.cpp | 209 int fds[2]; in Popen() 210 pipe(fds); in Popen() 212 fds[pipeRead], fds[pipeWrite], isRoot); in Popen() 221 dup2(fds[pipeRead], STDIN_FILENO); in Popen() 223 dup2(fds[pipeWrite], STDOUT_FILENO); in Popen() 224 dup2(fds[pipeWrite], STDERR_FILENO); in Popen() 226 close(fds[pipeRead]); in Popen() 227 close(fds[pipeWrite]); in Popen() 238 Base::CloseFd(fds[pipeWrite]); in Popen() 239 fcntl(fds[pipeRead], F_SETFD, FD_CLOEXEC); in Popen() [all …]
|
D | base.cpp | 1041 int CreateSocketPair(int *fds) in CreateSocketPair() argument 1045 int ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fds); in CreateSocketPair() 1048 if (fcntl(fds[i], F_SETFD, FD_CLOEXEC) == -1) { in CreateSocketPair() 1049 CloseFd(fds[0]); in CreateSocketPair() 1050 CloseFd(fds[1]); in CreateSocketPair() 1061 return socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, fds); in CreateSocketPair() 1067 if (fds == 0) { in CreateSocketPair() 1078 fds[0] = fds[1] = (int)-1; in CreateSocketPair() 1092 fds[0] = socket(AF_INET, SOCK_STREAM, 0); in CreateSocketPair() 1093 if (fds[0] == -1) { in CreateSocketPair() [all …]
|
D | base.h | 70 int CreateSocketPair(int *fds); 71 void CloseSocketPair(int *fds);
|
D | forward.h | 28 int fds[2]; variable
|
D | forward.cpp | 22 fds[0] = -1; in HdcForwardBase() 23 fds[1] = -1; in HdcForwardBase() 664 WRITE_LOG(LOG_DEBUG, "DoForwardBegin ark socketpair id:%u fds[0]:%d", ctx->id, fds[0]); in DoForwardBegin() 666 uv_tcp_open(&ctx->tcp, fds[0]); in DoForwardBegin()
|
/developtools/profiler/device/base/src/ |
D | common.cpp | 242 FILE* CustomPopen(const std::vector<std::string>& command, const char* type, int fds[], in CustomPopen() argument 257 CHECK_TRUE(pipe(fds) == 0, nullptr, "Pipe open failed!"); in CustomPopen() 274 CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen() 275 dup2(fds[WRITE], STDOUT_FILENO); // Redirect stdout to pipe in CustomPopen() 276 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen() 278 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen() 279 dup2(fds[READ], STDIN_FILENO); // Redirect stdin to pipe in CustomPopen() 280 CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen() 294 … CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "%s %d CustomFdClose failed! errno(%s)\n", in CustomPopen() 298 … CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "%s %d CustomFdClose failed! errno(%s)\n", in CustomPopen() [all …]
|
/developtools/profiler/device/base/include/ |
D | common.h | 33 FILE* CustomPopen(const std::vector<std::string>& command, const char* type, int fds[], 35 int CustomPclose(FILE* fp, int fds[], volatile pid_t& childPid, bool needUnblock = false); 36 int CustomPUnblock(int fds[]);
|
/developtools/profiler/hiebpf/src/ |
D | bpf_log_reader.cpp | 145 struct pollfd fds; in MoveBPFLog() local 146 fds.fd = ifd_; in MoveBPFLog() 147 fds.events = POLLIN; in MoveBPFLog() 150 int ret = poll(&fds, nfds, timeout); in MoveBPFLog()
|
/developtools/hdc/hdc_rust/src/common/ |
D | uds.rs | 165 pub fn wrap_poll(fds: &mut [PollNode], size: u32, timeout: i32) -> i32 { in wrap_poll() 169 for (index, node) in fds.iter_mut().enumerate() { in wrap_poll() 180 fds[i].revents = pollfds[i].revents; in wrap_poll() 181 fds[i].events = pollfds[i].events; in wrap_poll()
|
/developtools/profiler/hiebpf/include/ |
D | vmlinux.h | 26823 int fds[2]; member
|