Home
last modified time | relevance | path

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

1234

/hardware/interfaces/dumpstate/aidl/vts/functional/
DVtsHalDumpstateTargetTest.cpp139 int fds[2]; in TEST_P() local
140 ASSERT_EQ(0, pipe2(fds, O_NONBLOCK)) << errno; in TEST_P()
143 dumpstateFds.emplace_back(fds[1]); in TEST_P()
147 AssertStatusForMode(status, EX_NONE, 0, [&fds]() { in TEST_P()
150 ASSERT_EQ(1, read(fds[0], &buff, 1)) << "Dumped nothing"; in TEST_P()
153 close(fds[1]); in TEST_P()
154 close(fds[0]); in TEST_P()
191 int fds[2]; in TEST_P() local
192 ASSERT_EQ(0, pipe2(fds, O_NONBLOCK)) << errno; in TEST_P()
195 dumpstateFds.emplace_back(fds[1]); in TEST_P()
[all …]
/hardware/google/gfxstream/guest/mesa/src/util/u_gralloc/
Du_gralloc_fallback.c143 get_native_buffer_fds(const native_handle_t *handle, int fds[3]) in get_native_buffer_fds()
154 fds[i] = handle->data[i]; in get_native_buffer_fds()
170 int fds[3]; in fallback_gralloc_get_yuv_info() local
173 num_fds = get_native_buffer_fds(hnd->handle, fds); in fallback_gralloc_get_yuv_info()
238 out->fds[1] = out->fds[0] = fds[0]; in fallback_gralloc_get_yuv_info()
240 out->fds[2] = fds[0]; in fallback_gralloc_get_yuv_info()
243 out->fds[0] = fds[0]; in fallback_gralloc_get_yuv_info()
244 out->fds[1] = fds[1]; in fallback_gralloc_get_yuv_info()
245 out->fds[2] = fds[2]; in fallback_gralloc_get_yuv_info()
259 int fds[3]; in fallback_gralloc_get_buffer_info() local
[all …]
Du_gralloc_cros_api.c42 int fds[4]; member
63 out->fds[i] = info.fds[i]; in cros_get_buffer_info()
/hardware/interfaces/dumpstate/1.1/vts/functional/
DVtsHalDumpstateV1_1TargetTest.cpp161 int fds[2]; in TEST_P() local
162 ASSERT_EQ(0, pipe2(fds, O_NONBLOCK)) << errno; in TEST_P()
166 handle->data[0] = fds[1]; in TEST_P()
171 AssertStatusForMode(status, DumpstateStatus::OK, [&fds]() { in TEST_P()
174 ASSERT_EQ(1, read(fds[0], &buff, 1)) << "Dumped nothing"; in TEST_P()
215 int fds[2]; in TEST_P() local
216 ASSERT_EQ(0, pipe2(fds, O_NONBLOCK)) << errno; in TEST_P()
220 handle->data[0] = fds[1]; in TEST_P()
237 int fds[2]; in TEST_P() local
238 ASSERT_EQ(0, pipe2(fds, O_NONBLOCK)) << errno; in TEST_P()
[all …]
/hardware/interfaces/common/support/
DNativeHandle.cpp29 return handle.fds.empty() && handle.ints.empty(); in isAidlNativeHandleEmpty()
33 native_handle_t* to = native_handle_create(handle.fds.size(), handle.ints.size()); in fromAidl()
36 for (size_t i = 0; i < handle.fds.size(); i++) { in fromAidl()
37 int fd = handle.fds[i].get(); in fromAidl()
40 memcpy(to->data + handle.fds.size(), handle.ints.data(), handle.ints.size() * sizeof(int)); in fromAidl()
54 to.fds = std::vector<ndk::ScopedFileDescriptor>(handle->numFds); in toAidl()
57 to.fds.at(i).set(doDup ? fcntl(fd, F_DUPFD_CLOEXEC, 0) : fd); in toAidl()
Dtest.cpp27 ASSERT_EQ(libcutils->numFds, aidl.fds.size()); in checkEq()
30 int afd = aidl.fds.at(i).get(); in checkEq()
55 .fds = std::vector<ScopedFileDescriptor>(2), in makeTestAidlHandle()
58 handle.fds[0].set(dup(0)); in makeTestAidlHandle()
59 handle.fds[1].set(dup(0)); in makeTestAidlHandle()
/hardware/google/gchips/gralloc4/src/
Dmali_gralloc_buffer4.h173 int fds[MAX_FDS]; member
286 memcpy(fds, _fds, sizeof(fds)); in private_handle_t()
288 memset(fds, -1, sizeof(fds)); in private_handle_t()
367 return fds[idx]; in get_share_attr_fd()
377 fds[idx] = fd; in set_share_attr_fd()
409 fds[0], fds[1], fds[2], fds[3], in dump()
Dmali_gralloc_buffer.h173 int fds[MAX_FDS]; member
286 memcpy(fds, _fds, sizeof(fds)); in private_handle_t()
288 memset(fds, -1, sizeof(fds)); in private_handle_t()
367 return fds[idx]; in get_share_attr_fd()
377 fds[idx] = fd; in set_share_attr_fd()
409 fds[0], fds[1], fds[2], fds[3], in dump()
/hardware/libhardware_legacy/
Duevent.c77 struct pollfd fds; in uevent_next_event() local
80 fds.fd = fd; in uevent_next_event()
81 fds.events = POLLIN; in uevent_next_event()
82 fds.revents = 0; in uevent_next_event()
83 nr = poll(&fds, 1, -1); in uevent_next_event()
85 if(nr > 0 && (fds.revents & POLLIN)) { in uevent_next_event()
/hardware/qcom/sm8150/media/hypv-intercept/
Dhypv_intercept.cpp285 static void* exit_thread(void *fds) in exit_thread() argument
287 struct pollfd *pfds = (struct pollfd *)fds; in exit_thread()
306 int hypv_poll(struct pollfd *fds, nfds_t nfds, int timeout) in hypv_poll() argument
319 if (IS_HYPERVISOR_VIDEO_HANDLE(fds[0].fd)) { in hypv_poll()
320 int fd_index = fds[0].fd & HYPV_HANDLE_MASK; in hypv_poll()
331 fds[1].revents = fds[0].revents = 0; in hypv_poll()
334 if (pthread_create(&handle->thread_id, 0, exit_thread, fds)) { in hypv_poll()
356 fds[1].revents = POLLIN; in hypv_poll()
360 fds[0].revents = handle->event_flags[handle->event_q_front++]; in hypv_poll()
363 fds[0].fd, fds[0].revents, in hypv_poll()
[all …]
/hardware/google/gfxstream/guest/mesa/src/util/
Dlibsync.h104 struct pollfd fds = {0};
108 fds.fd = fd;
109 fds.events = POLLIN;
113 ret = poll(&fds, 1, timeout);
116 if (fds.revents & (POLLERR | POLLNVAL)) {
/hardware/interfaces/wifi/netlinkinterceptor/aidl/default/
DInterceptorRelay.cpp51 pollfd fds[] = { in relayMessages() local
55 if (poll(fds, countof(fds), kPollTimeout.count()) < 0) { in relayMessages()
59 const auto nlsockEvents = fds[0].revents; in relayMessages()
/hardware/interfaces/dumpstate/1.0/vts/functional/
DVtsHalDumpstateV1_0TargetTest.cpp66 int fds[2]; in TEST_P() local
67 ASSERT_EQ(0, pipe2(fds, O_NONBLOCK)) << errno; in TEST_P()
71 handle->data[0] = fds[1]; in TEST_P()
78 ASSERT_EQ(1, read(fds[0], &buff, 1)) << "dumped nothing"; in TEST_P()
/hardware/google/gchips/gralloc4/src/allocator/
Dmali_gralloc_ion.cpp280 const int fd = hnd->fds[i]; in mali_gralloc_ion_sync()
311 close(hnd->fds[i]); in mali_gralloc_ion_free()
312 hnd->fds[i] = -1; in mali_gralloc_ion_free()
337 hnd->fds[idx] = alloc_from_dmabuf_heap(usage, hnd->attr_size); in mali_gralloc_ion_allocate_attr()
338 if (hnd->fds[idx] < 0) in mali_gralloc_ion_allocate_attr()
404 int& fd = hnd->fds[fidx]; in mali_gralloc_ion_allocate()
438 …ar *)mmap(NULL, bufDescriptor->alloc_sizes[0], PROT_READ | PROT_WRITE, MAP_SHARED, hnd->fds[0], 0); in mali_gralloc_ion_allocate()
442 MALI_GRALLOC_LOGE("mmap failed for fd ( %d )", hnd->fds[0]); in mali_gralloc_ion_allocate()
504 MAP_SHARED, hnd->fds[fidx], 0); in mali_gralloc_ion_map()
510 fidx, hnd->fds[fidx], hnd->alloc_sizes[fidx], strerror(err)); in mali_gralloc_ion_map()
/hardware/knowles/athletico/sound_trigger_hal/tests/
Dcrash_event_logger.c592 struct pollfd fds[2]; in main() local
619 fds[0].events = POLLIN; in main()
620 fds[0].fd = uevent_open_socket(64*1024, true); in main()
621 if (fds[0].fd == -1) { in main()
626 fds[1].events = POLLIN; in main()
627 fds[1].fd = g_exit_socket[1]; in main()
630 err = poll (fds, 2, timeout); in main()
632 if (fds[0].revents & POLLIN) { in main()
633 n = uevent_kernel_multicast_recv(fds[0].fd, msg, UEVENT_MSG_LEN); in main()
651 } else if (fds[1].revents & POLLIN) { in main()
[all …]
/hardware/interfaces/bluetooth/1.0/default/
Dmct_protocol.cc31 MctProtocol::MctProtocol(int* fds, PacketReadCallback event_cb, in MctProtocol() argument
38 uart_fds_[i] = fds[i];
/hardware/interfaces/automotive/evs/aidl/vts/
DFrameHandler.cpp46 dup.fds = std::vector<::ndk::ScopedFileDescriptor>(handle.fds.size()); in dupNativeHandle()
48 for (auto i = 0; i < handle.fds.size(); ++i) { in dupNativeHandle()
49 dup.fds.at(i).set(handle.fds[i].get()); in dupNativeHandle()
52 for (auto i = 0; i < handle.fds.size(); ++i) { in dupNativeHandle()
53 dup.fds[i] = std::move(handle.fds[i].dup()); in dupNativeHandle()
/hardware/interfaces/neuralnetworks/aidl/utils/src/
DUtils.cpp54 auto fds = NN_TRY(cloneVec(handle.fds)); in clone() local
56 .fds = std::move(fds), in clone()
/hardware/interfaces/neuralnetworks/1.0/utils/src/
DConversions.cpp89 std::vector<base::unique_fd> fds = in unknownHandleFromNativeHandle() local
95 return nn::Memory::Unknown::Handle{.fds = std::move(fds), .ints = std::move(ints)}; in unknownHandleFromNativeHandle()
408 nn::GeneralResult<hidl_handle> createNativeHandleFrom(std::vector<base::unique_fd> fds, in createNativeHandleFrom() argument
411 CHECK_LE(fds.size(), kIntMax); in createNativeHandleFrom()
414 native_handle_create(static_cast<int>(fds.size()), static_cast<int>(ints.size())); in createNativeHandleFrom()
419 for (size_t i = 0; i < fds.size(); ++i) { in createNativeHandleFrom()
420 nativeHandle->data[i] = fds[i].release(); in createNativeHandleFrom()
431 std::vector<base::unique_fd> fds; in createNativeHandleFrom() local
432 fds.push_back(std::move(fd)); in createNativeHandleFrom()
433 return createNativeHandleFrom(std::move(fds), ints); in createNativeHandleFrom()
[all …]
/hardware/interfaces/threadnetwork/aidl/default/
Dsocket_interface.cpp263 fd_set fds; in WaitForSocketFileCreated() local
264 FD_ZERO(&fds); in WaitForSocketFileCreated()
265 FD_SET(inotifyFd, &fds); in WaitForSocketFileCreated()
269 int rval = select(inotifyFd + 1, &fds, nullptr, nullptr, &timeout); in WaitForSocketFileCreated()
276 if (FD_ISSET(inotifyFd, &fds)) { in WaitForSocketFileCreated()
/hardware/interfaces/wifi/netlinkinterceptor/vts/functional/
Dinterceptor_aidl_test.cpp116 pollfd fds[] = { in multicastReceiver() local
120 if (poll(fds, 1, 300) < 0) { in multicastReceiver()
124 const auto nlsockEvents = fds[0].revents; in multicastReceiver()
/hardware/interfaces/common/aidl/android/hardware/common/
DNativeHandle.aidl24 ParcelFileDescriptor[] fds;
/hardware/interfaces/common/aidl/aidl_api/android.hardware.common/1/android/hardware/common/
DNativeHandle.aidl21 ParcelFileDescriptor[] fds;
/hardware/interfaces/common/aidl/aidl_api/android.hardware.common/current/android/hardware/common/
DNativeHandle.aidl37 ParcelFileDescriptor[] fds;
/hardware/interfaces/common/aidl/aidl_api/android.hardware.common/2/android/hardware/common/
DNativeHandle.aidl37 ParcelFileDescriptor[] fds;

1234