Home
last modified time | relevance | path

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

/device/google/cuttlefish/common/libs/fs/
Dshared_fd_test.cpp31 SharedFD fds[2]; in TEST() local
32 SharedFD::Pipe(fds, fds + 1); in TEST()
33 EXPECT_TRUE(fds[0]->IsOpen()); in TEST()
34 EXPECT_TRUE(fds[1]->IsOpen()); in TEST()
35 EXPECT_EQ(sizeof(pipe_message), fds[1]->Write(pipe_message, sizeof(pipe_message))); in TEST()
37 EXPECT_EQ(sizeof(pipe_message), fds[0]->Read(buf, sizeof(buf))); in TEST()
Dshared_fd.cpp221 int fds[2]; in Pipe() local
222 int rval = pipe(fds); in Pipe()
224 (*fd0) = std::shared_ptr<FileInstance>(new FileInstance(fds[0], errno)); in Pipe()
225 (*fd1) = std::shared_ptr<FileInstance>(new FileInstance(fds[1], errno)); in Pipe()
244 int fds[2]; in SocketPair() local
245 int rval = socketpair(domain, type, protocol, fds); in SocketPair()
247 (*fd0) = std::shared_ptr<FileInstance>(new FileInstance(fds[0], errno)); in SocketPair()
248 (*fd1) = std::shared_ptr<FileInstance>(new FileInstance(fds[1], errno)); in SocketPair()
/device/generic/goldfish/network/netmgr/
Dpoller.cpp83 std::vector<struct pollfd> fds; in run() local
86 fds.clear(); in run()
90 size_t start = fds.size(); in run()
91 pollable->getPollData(&fds); in run()
94 for (size_t i = start; i < fds.size(); ++i) { in run()
95 pollables[fds[i].fd] = pollable; in run()
104 status = ::ppoll(fds.data(), fds.size(), tsPtr, &mask); in run()
115 for (const auto& fd : fds) { in run()
Dcommander.cpp57 void Commander::getPollData(std::vector<pollfd>* fds) const { in getPollData()
59 fds->push_back(pollfd{mPipeFd, POLLIN, 0}); in getPollData()
Dpollable.h35 virtual void getPollData(std::vector<pollfd>* fds) const = 0;
Dwifi_forwarder.cpp183 void WifiForwarder::getPollData(std::vector<pollfd>* fds) const { in getPollData()
189 fds->push_back(pollfd{pcapFd, POLLIN, 0}); in getPollData()
194 fds->push_back(pollfd{mPipeFd, POLLIN, 0}); in getPollData()
Dmonitor.cpp112 void Monitor::getPollData(std::vector<pollfd>* fds) const { in getPollData()
114 fds->push_back(pollfd{mSocketFd, POLLIN, 0}); in getPollData()
Dcommander.h36 void getPollData(std::vector<pollfd>* fds) const override;
Dwifi_forwarder.h38 void getPollData(std::vector<pollfd>* fds) const override;
Dmonitor.h41 void getPollData(std::vector<pollfd>* fds) const override;
/device/generic/goldfish/network/wifi_forwarder/
Dpoller.cpp82 std::vector<struct pollfd> fds; in run() local
85 fds.clear(); in run()
89 size_t start = fds.size(); in run()
90 pollable->getPollData(&fds); in run()
93 for (size_t i = start; i < fds.size(); ++i) { in run()
94 pollables[fds[i].fd] = pollable; in run()
103 status = ::ppoll(fds.data(), fds.size(), tsPtr, &mask); in run()
114 for (const auto& fd : fds) { in run()
Dwifi_forwarder.cpp67 void WifiForwarder::getPollData(std::vector<pollfd>* fds) const { in getPollData()
71 fds->push_back(pfd); in getPollData()
76 fds->push_back(pfd); in getPollData()
Dpollable.h35 virtual void getPollData(std::vector<pollfd>* fds) const = 0;
Dwifi_forwarder.h36 void getPollData(std::vector<pollfd>* fds) const override;
/device/generic/goldfish/wifi/wifi_hal/
Dnetlink.cpp98 struct pollfd fds[2]; in eventLoop() local
99 memset(fds, 0, sizeof(fds)); in eventLoop()
100 fds[0].fd = mSocket; in eventLoop()
101 fds[0].events = POLLIN; in eventLoop()
102 fds[1].fd = mControlPipe[kControlRead]; in eventLoop()
103 fds[1].events = POLLIN; in eventLoop()
106 int status = ::poll(fds, 2, -1); in eventLoop()
118 for (auto& fd : fds) { in eventLoop()
/device/generic/goldfish/radio/ril/
Dif_monitor.cpp221 std::vector<struct pollfd> fds(2); in run() local
222 fds[0].events = POLLIN; in run()
223 fds[0].fd = mControlSocket[kControlServer]; in run()
224 fds[1].events = POLLIN; in run()
225 fds[1].fd = mSocketFd; in run()
227 int status = ::poll(fds.data(), fds.size(), -1); in run()
241 if (fds[0].revents & POLLIN) { in run()
251 } else if (fds[1].revents & POLLIN) { in run()
Dipv6_monitor.cpp297 std::array<struct pollfd, 2> fds; in run() local
298 fds[0].events = POLLIN; in run()
299 fds[0].fd = mControlSocket[kControlServer]; in run()
300 fds[1].events = POLLIN; in run()
301 fds[1].fd = mSocketFd; in run()
305 int status = ::poll(fds.data(), fds.size(), mPollTimeout); in run()
337 if (fds[0].revents & POLLIN) { in run()
347 } else if (fds[1].revents & POLLIN) { in run()
/device/google/cuttlefish/guest/hals/camera/
DEmulatedCameraDevice.cpp369 fd_set fds[1]; in Select() local
375 FD_ZERO(fds); in Select()
376 FD_SET(mControlFD, fds); in Select()
378 FD_SET(fd, fds); in Select()
385 int res = TEMP_FAILURE_RETRY(select(fd_num, fds, NULL, NULL, tvp)); in Select()
393 } else if (FD_ISSET(mControlFD, fds)) { in Select()
412 ALOGW_IF(fd < 0 || !FD_ISSET(fd, fds), "%s: Undefined 'select' result", in Select()
/device/generic/goldfish/wifi/createns/
Dcreatens.cpp221 int fds[2]; in main() local
222 if (::pipe2(fds, O_CLOEXEC) != 0) { in main()
227 Fd readPipe(fds[0]); in main()
228 Fd writePipe(fds[1]); in main()
/device/linaro/dragonboard/qcom/qrtr/lib/
Dqrtr.c181 struct pollfd fds; in qrtr_poll() local
183 fds.fd = sock; in qrtr_poll()
184 fds.revents = 0; in qrtr_poll()
185 fds.events = POLLIN | POLLERR; in qrtr_poll()
187 return poll(&fds, 1, ms); in qrtr_poll()
/device/google/cuttlefish/host/commands/kernel_log_monitor/
Dmain.cc51 auto fds = android::base::Split(FLAGS_subscriber_fds, ","); in SubscribersFromCmdline() local
53 for (auto& fd_str: fds) { in SubscribersFromCmdline()
/device/generic/goldfish/dhcp/client/
Ddhcpclient.cpp217 struct pollfd fds; in waitAndReceive() local
218 fds.fd = mSocket.get(); in waitAndReceive()
219 fds.events = POLLIN; in waitAndReceive()
232 int res = ::ppoll(&fds, 1, &ts, &pollSignalMask); in waitAndReceive()
/device/google/cuttlefish/host/commands/modem_simulator/
Dmain.cpp45 auto fds = android::base::Split(fd_list, ","); in ServerFdsFromCmdline() local
47 for (auto& fd_str: fds) { in ServerFdsFromCmdline()
/device/linaro/dragonboard/gralloc/
Dgralloc_gbm.cpp183 data.fds[0] = handle->prime_fd; in gbm_import()
/device/generic/goldfish-opengl/system/OpenglSystemCommon/
DHostConnection.cpp282 int ret = drmPrimeFDToHandle(m_fd, cros_handle->fds[0], &prime_handle); in getResInfo()