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.cpp338 int SharedFD::Poll(std::vector<PollSharedFd>& fds, int timeout) { in Poll() argument
339 return Poll(fds.data(), fds.size(), timeout); in Poll()
342 int SharedFD::Poll(PollSharedFd* fds, size_t num_fds, int timeout) { in Poll() argument
345 native_pollfds[i].fd = fds[i].fd->fd_; in Poll()
346 native_pollfds[i].events = fds[i].events; in Poll()
351 fds[i].revents = native_pollfds[i].revents; in Poll()
399 int fds[2]; in Pipe() local
401 int rval = pipe2(fds, O_CLOEXEC); in Pipe()
403 int rval = pipe(fds); in Pipe()
406 (*fd0) = std::shared_ptr<FileInstance>(new FileInstance(fds[0], errno)); in Pipe()
[all …]
Dshared_fd.h158 static int Poll(PollSharedFd* fds, size_t num_fds, int timeout);
159 static int Poll(std::vector<PollSharedFd>& fds, int timeout);
362 std::vector<int> fds; in SendFileDescriptors() local
363 android::base::Append(fds, std::forward<int>(sent_fds->fd_)...); in SendFileDescriptors()
365 auto ret = android::base::SendFileDescriptorVector(fd_, buf, len, fds); in SendFileDescriptors()
/device/google/cuttlefish/guest/commands/bt_vhci_forwarder/
Dmain.cpp110 struct pollfd fds[2]; in main() local
112 fds[0].fd = vhci_fd; in main()
113 fds[0].events = POLLIN; in main()
114 fds[1].fd = virtio_fd; in main()
115 fds[1].events = POLLIN; in main()
144 int ret = TEMP_FAILURE_RETRY(poll(fds, 2, -1)); in main()
149 if (fds[1].revents & POLLHUP) { in main()
154 if (fds[1].revents & (POLLIN | POLLERR)) { in main()
176 if (fds[0].revents & (POLLIN | POLLERR)) { in main()
/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/google/cuttlefish/common/libs/utils/
Dunix_sockets.cpp56 const std::vector<SharedFD>& fds) { in FromFileDescriptors() argument
58 message.data_.resize(CMSG_SPACE(fds.size() * sizeof(int)), 0); in FromFileDescriptors()
59 message.Raw()->cmsg_len = CMSG_LEN(fds.size() * sizeof(int)); in FromFileDescriptors()
62 for (int i = 0; i < fds.size(); i++) { in FromFileDescriptors()
63 int fd_copy = fds[i]->Fcntl(F_DUPFD_CLOEXEC, 3); in FromFileDescriptors()
64 CF_EXPECT(fd_copy >= 0, "Failed to duplicate fd: " << fds[i]->StrError()); in FromFileDescriptors()
168 std::vector<SharedFD> fds; in FileDescriptors() local
172 fds.insert(fds.end(), additional_fds.begin(), additional_fds.end()); in FileDescriptors()
175 return fds; in FileDescriptors()
Dunix_sockets_test.cpp57 auto fds = message.FileDescriptors(); in TEST() local
58 ASSERT_TRUE(fds.ok()); in TEST()
59 ASSERT_EQ("abc", ReadAllFDData((*fds)[0])); in TEST()
60 ASSERT_EQ("def", ReadAllFDData((*fds)[1])); in TEST()
Dsubprocess.cpp429 std::vector<int> fds; in Start() local
431 fds.emplace_back(static_cast<int>(redirect.first)); in Start()
434 fds.emplace_back(inherited_fd.second); in Start()
436 fds_arg = "--inherited_fds=" + fmt::format("{}", fmt::join(fds, ",")); in Start()
/device/generic/goldfish/camera/
DCachedStreamBuffer.cpp38 std::vector<T> data(sizeof(native_handle_t) / sizeof(T) + anh.fds.size() + in importAidlNativeHandle()
42 reinterpret_cast<char*>(&data[0]), anh.fds.size(), anh.ints.size()); in importAidlNativeHandle()
43 std::transform(anh.fds.begin(), anh.fds.end(), &h->data[0], in importAidlNativeHandle()
45 std::copy(anh.ints.begin(), anh.ints.end(), &h->data[anh.fds.size()]); in importAidlNativeHandle()
56 const size_t nfds = nh.fds.size(); in importAidlNativeHandleFence()
65 const int fd = fcntl(nh.fds.front().get(), F_DUPFD_CLOEXEC, 0); in importAidlNativeHandleFence()
/device/google/trout/hal/sensors/2.1/
DMultiPoll.cpp30 std::vector<pollfd> fds; in poll() local
34 fds.assign(mDescriptors.begin(), mDescriptors.end()); in poll()
37 int err = ::poll(&fds[0], fds.size(), mSamplingPeriodMs); in poll()
40 for (const auto& fd : fds) { in poll()
/device/google/cuttlefish/host/commands/run_cvd/launch/
Dstreamer.cpp176 std::vector<SharedFD> fds; in InitializeVConsoles() local
178 fds.emplace_back(CF_EXPECT(SharedFD::Fifo(path, 0660))); in InitializeVConsoles()
180 confui_in_fd_ = fds[0]; in InitializeVConsoles()
181 confui_out_fd_ = fds[1]; in InitializeVConsoles()
182 sensors_host_to_guest_fd_ = fds[2]; in InitializeVConsoles()
183 sensors_guest_to_host_fd_ = fds[3]; in InitializeVConsoles()
/device/generic/goldfish-opengl/system/hals/
Dcb_handle_30.h57 fds[0] = -1; in cb_handle_30_t()
58 fds[1] = -1; in cb_handle_30_t()
62 fds[bufferFdIndex] = p_bufferFd; in cb_handle_30_t()
69 fds[hostHandleRefcountFdIndex] = p_hostHandleRefCountFd; in cb_handle_30_t()
Dallocator3.cpp414 ::close(cb->fds[cb->hostHandleRefcountFdIndex]); in freeCb()
419 GoldfishAddressSpaceHostMemoryAllocator::closeHandle(cb->fds[cb->bufferFdIndex]); in freeCb()
Dmapper3.cpp244 cb->fds[cb->bufferFdIndex], in importBufferImpl()
/device/linaro/dragonboard/shared/utils/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/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/kernel_log_monitor/
Dmain.cc53 auto fds = android::base::Split(FLAGS_subscriber_fds, ","); in SubscribersFromCmdline() local
55 for (auto& fd_str: fds) { in SubscribersFromCmdline()
/device/generic/goldfish-opengl/system/gralloc/
Dgralloc_old.cpp110 fds[kBufferFdIndex] = p_fd; in cb_handle_old_t()
116 return qemu_pipe_valid(fds[kHostHandleRefCountIndex]); in hasRefcountPipe()
123 fds[kHostHandleRefCountIndex] = fd; in setRefcountPipeFd()
444 const int bufferFd = cb->fds[kBufferFdIndex]; in map_buffer()
982 const int bufferFd = cb->fds[kBufferFdIndex]; in gralloc_free()
992 if(qemu_pipe_valid(cb->fds[kHostHandleRefCountIndex])) { in gralloc_free()
993 qemu_pipe_close(cb->fds[kHostHandleRefCountIndex]); in gralloc_free()
/device/google/cuttlefish/host/commands/modem_simulator/
Dmain.cpp49 auto fds = android::base::Split(fd_list, ","); in ServerFdsFromCmdline() local
51 for (auto& fd_str: fds) { in ServerFdsFromCmdline()
/device/google/cuttlefish/host/commands/run_cvd/
Dboot_state_machine.cc399 std::vector<SharedFD> fds = {reboot_notification_, fg_launcher_pipe_}; in MaybeWriteNotification() local
400 for (auto& fd : fds) { in MaybeWriteNotification()
/device/generic/goldfish-opengl/system/hwc3/
DDrmClient.cpp241 int ret = drmPrimeFDToHandle(mFd.get(), crosHandle->fds[0], &primeHandle); in create()
251 buffer->mPlaneFds[0] = crosHandle->fds[0]; in create()
/device/generic/goldfish-opengl/system/codecs/c2/decoders/base/
Dcros_gralloc_handle.h25 int32_t fds[DRV_MAX_FDS]; member
Dcolor_buffer_utils.cpp104 int ret = drmPrimeFDToHandle(m_rendernodeFd, cros_handle->fds[0], &prime_handle); in getResInfo()
/device/google/redbull-kernel/sm7250/original-kernel-headers/drm/
Dmsm_drm_pp.h548 __u32 fds[LTM_BUFFER_SIZE]; member
/device/google/redbull-kernel/sm7250/kernel-headers/drm/
Dmsm_drm_pp.h348 __u32 fds[LTM_BUFFER_SIZE]; member