Home
last modified time | relevance | path

Searched refs:fds (Results 1 - 14 of 14) sorted by relevance

/developtools/hdc/src/daemon/
H A Ddaemon_forward.cpp58 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()
[all...]
H A Ddaemon.cpp249 int fds[2]; in InitMod() local
250 pipe(fds); in InitMod()
259 close(fds[0]); in InitMod()
261 dup2(fds[1], STDOUT_FILENO); in InitMod()
262 dup2(fds[1], STDERR_FILENO); in InitMod()
272 Base::CloseFd(fds[1]); in InitMod()
275 int nbytes = read(fds[0], buf, sizeof(buf) - 1); in InitMod()
277 close(fds[0]); in InitMod()
/developtools/hdc/src/common/
H A Dasync_cmd.cpp211 int fds[2]; in Popen()
212 pipe(fds); in Popen()
213 WRITE_LOG(LOG_DEBUG, "Popen pipe fds[pipeRead]:%d fds[pipeWrite]:%d, mode %d", in Popen()
214 fds[pipeRead], fds[pipeWrite], isRoot); in Popen()
223 dup2(fds[pipeRead], STDIN_FILENO); in Popen()
225 dup2(fds[pipeWrite], STDOUT_FILENO); in Popen()
226 dup2(fds[pipeWrite], STDERR_FILENO); in Popen()
228 close(fds[pipeRea in Popen()
[all...]
H A Dbase.cpp1535 int CreateSocketPair(int *fds) in CreateSocketPair() argument
1539 int ret = socketpair(AF_UNIX, SOCK_STREAM, 0, fds); in CreateSocketPair()
1542 if (fcntl(fds[i], F_SETFD, FD_CLOEXEC) == -1) { in CreateSocketPair()
1543 CloseFd(fds[0]); in CreateSocketPair()
1544 CloseFd(fds[1]); in CreateSocketPair()
1555 return socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, fds); in CreateSocketPair()
1561 if (fds == 0) { in CreateSocketPair()
1572 fds[0] = fds[1] = (int)-1; in CreateSocketPair()
1586 fds[ in CreateSocketPair()
1608 CloseSocketPair(int *fds) CloseSocketPair() argument
[all...]
H A Dbase.h97 int CreateSocketPair(int *fds);
98 void CloseSocketPair(int *fds);
H A Dforward.h28 int fds[2]; member in Hdc::HdcForwardBase
H A Dforward.cpp22 fds[0] = -1; in HdcForwardBase()
23 fds[1] = -1; in HdcForwardBase()
673 WRITE_LOG(LOG_DEBUG, "DoForwardBegin ark socketpair id:%u fds[0]:%d", ctx->id, fds[0]); in DoForwardBegin()
675 uv_tcp_open(&ctx->tcp, fds[0]); in DoForwardBegin()
/developtools/hdc/test/unittest/common/
H A Ddaemon_uart_test.cpp95 void PrepareDeamonReadThreadData(std::vector<uint8_t> &data, int fds[PAIR]) in PrepareDeamonReadThreadData() argument
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]; in HWTEST_F() local
446 PrepareDeamonReadThreadData(data, fds); in HWTEST_F()
452 MockUartDevSender(fds[SENDER], data.data(), data.size(), 0ms, true); in HWTEST_F()
456 close(fds[SENDER]); in HWTEST_F()
457 close(fds[RECEIVER]); in HWTEST_F()
469 int fds[PAIR]; in HWTEST_F() local
472 PrepareDeamonReadThreadData(data, fds); in HWTEST_F()
494 int fds[PAIR]; HWTEST_F() local
520 int fds[PAIR]; HWTEST_F() local
546 int fds[PAIR]; HWTEST_F() local
573 int fds[PAIR]; HWTEST_F() local
603 int fds[PAIR]; HWTEST_F() local
629 int fds[PAIR]; HWTEST_F() local
[all...]
/developtools/profiler/device/base/src/
H A Dcommon.cpp273 FILE* CustomPopen(const std::vector<std::string>& command, const char* type, int fds[], in CustomPopen() argument
299 CHECK_TRUE(pipe(fds) == 0, nullptr, "Pipe open failed!"); in CustomPopen()
314 CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen()
315 dup2(fds[WRITE], STDOUT_FILENO); // Redirect stdout to pipe in CustomPopen()
316 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen()
318 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen()
319 dup2(fds[READ], STDIN_FILENO); // Redirect stdin to pipe in CustomPopen()
320 CHECK_TRUE(CustomFdClose(fds[READ]) == 0, nullptr, "CustomFdClose failed!"); in CustomPopen()
334 CHECK_TRUE(CustomFdClose(fds[WRITE]) == 0, nullptr, "%s %d CustomFdClose failed! errno(%s)\n", in CustomPopen()
338 CHECK_TRUE(CustomFdClose(fds[REA in CustomPopen()
368 CustomPclose(FILE* fp, int fds[], volatile pid_t& childPid, bool needUnblock) CustomPclose() argument
415 CustomPUnblock(int fds[]) CustomPUnblock() argument
[all...]
/developtools/hdc/sudo/src/
H A Dmain.cpp272 int fds[2]; in UserAccountVerify() local
274 if (pipe(fds) != 0) { in UserAccountVerify()
285 close(fds[0]); in UserAccountVerify()
303 write(fds[1], &verifyResult, sizeof(verifyResult)); in UserAccountVerify()
304 close(fds[1]); in UserAccountVerify()
307 close(fds[1]); in UserAccountVerify()
309 read(fds[0], &verifyResult, sizeof(verifyResult)); in UserAccountVerify()
310 close(fds[0]); in UserAccountVerify()
/developtools/profiler/hiebpf/src/
H A Dbpf_log_reader.cpp145 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/profiler/device/base/include/
H A Dcommon.h33 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/hdc/hdc_rust/src/common/
H A Duds.rs185 pub fn wrap_poll(fds: &mut [PollNode], size: u32, timeout: i32) -> i32 { in wrap_poll()
189 for (index, node) in fds.iter_mut().enumerate() { in wrap_poll()
204 if i >= fds.len() { in wrap_poll()
207 fds[i].revents = pollfds[i].revents; in wrap_poll()
208 fds[i].events = pollfds[i].events; in wrap_poll()
/developtools/profiler/hiebpf/include/
H A Dvmlinux.h26823 int fds[2]; member
[all...]

Completed in 432 milliseconds