Home
last modified time | relevance | path

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

123

/frameworks/base/core/java/android/os/
DNativeHandle.java64 private static FileDescriptor[] createFileDescriptorArray(@NonNull int[] fds) { in createFileDescriptorArray() argument
65 FileDescriptor[] list = new FileDescriptor[fds.length]; in createFileDescriptorArray()
66 for (int i = 0; i < fds.length; i++) { in createFileDescriptorArray()
68 descriptor.setInt$(fds[i]); in createFileDescriptorArray()
80 private NativeHandle(@NonNull int[] fds, @NonNull int[] ints, boolean own) { in NativeHandle() argument
81 this(createFileDescriptorArray(fds), ints, own); in NativeHandle()
89 public NativeHandle(@NonNull FileDescriptor[] fds, @NonNull int[] ints, boolean own) { in NativeHandle() argument
90 mFds = fds.clone(); in NativeHandle()
114 FileDescriptor[] fds = new FileDescriptor[mFds.length]; in dup() local
120 fds[i] = newFd; in dup()
[all …]
/frameworks/base/services/core/jni/
Dcom_android_server_AlarmManagerService.cpp77 AlarmImpl(const TimerFds &fds, int epollfd, int rtc_id) : in AlarmImpl() argument
78 fds{fds}, epollfd{epollfd}, rtc_id{rtc_id} { } in AlarmImpl()
87 const TimerFds fds; member in android::AlarmImpl
94 for (auto fd : fds) { in ~AlarmImpl()
119 return timerfd_settime(fds[type], TFD_TIMER_ABSTIME, &spec, NULL); in set()
129 return timerfd_gettime(fds[type], spec); in getTime()
196 ssize_t err = read(fds[alarm_idx], &unused, sizeof(unused)); in waitForAlarm()
343 TimerFds fds; in android_server_AlarmManagerService_init() local
345 epollfd = epoll_create(fds.size()); in android_server_AlarmManagerService_init()
347 ALOGE("epoll_create(%zu) failed: %s", fds.size(), in android_server_AlarmManagerService_init()
[all …]
Dcom_android_server_UsbMidiDevice.cpp92 jobjectArray fds = env->NewObjectArray(subdevice_count + 1, sFileDescriptorClass, NULL); in android_server_UsbMidiDevice_open() local
93 if (!fds) { in android_server_UsbMidiDevice_open()
106 env->SetObjectArrayElement(fds, i, fileDescriptor); in android_server_UsbMidiDevice_open()
114 env->SetObjectArrayElement(fds, subdevice_count, fileDescriptor); in android_server_UsbMidiDevice_open()
119 return fds; in android_server_UsbMidiDevice_open()
123 android_server_UsbMidiDevice_close(JNIEnv *env, jobject thiz, jobjectArray fds) in android_server_UsbMidiDevice_close() argument
131 int count = env->GetArrayLength(fds); in android_server_UsbMidiDevice_close()
133 jobject fd = env->GetObjectArrayElement(fds, i); in android_server_UsbMidiDevice_close()
/frameworks/native/libs/vr/libbufferhub/include/private/dvr/
Dnative_handle_wrapper.h51 std::vector<FileHandleType> fds; in DuplicateHandle() local
56 fds.emplace_back(fd.Duplicate()); in DuplicateHandle()
59 return FromFdsAndInts(std::move(fds), ints_); in DuplicateHandle()
75 static native_handle_t* FromFdsAndInts(std::vector<FileHandleType> fds, in FromFdsAndInts() argument
77 native_handle_t* handle = native_handle_create(fds.size(), ints.size()); in FromFdsAndInts()
85 handle->data[i] = fds[i].Release(); in FromFdsAndInts()
/frameworks/native/libs/gui/bufferqueue/1.0/
DConversion.cpp225 int* fds = new int[numFds]; in convertTo() local
243 std::copy(handle->data, intsStart, fds); in convertTo()
249 int const* constFds = static_cast<int const*>(fds); in convertTo()
252 delete [] fds; in convertTo()
374 void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { in unflattenFence() argument
391 *nh = native_handle_create_from_fd(*fds); in unflattenFence()
396 ++fds; in unflattenFence()
417 void*& buffer, size_t& size, int*& fds, size_t& numFds) { in flattenFence() argument
428 *fds = fd; in flattenFence()
429 ++fds; in flattenFence()
[all …]
DH2BGraphicBufferProducer.cpp160 int* fds = new int[numFds]; in convertTo() local
178 std::copy(handle->data, intsStart, fds); in convertTo()
184 int const* constFds = static_cast<int const*>(fds); in convertTo()
187 delete [] fds; in convertTo()
236 void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { in unflattenFence() argument
253 *nh = native_handle_create_from_fd(*fds); in unflattenFence()
258 ++fds; in unflattenFence()
279 void*& buffer, size_t& size, int*& fds, size_t& numFds) { in flattenFence() argument
290 *fds = fd; in flattenFence()
291 ++fds; in flattenFence()
[all …]
/frameworks/native/libs/gui/include/gui/bufferqueue/1.0/
DConversion.h327 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
340 void*& buffer, size_t& size, int*& fds, size_t& numFds);
401 void*& buffer, size_t& size, int*& fds, size_t& numFds);
420 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
459 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
476 void*& buffer, size_t& size, int*& fds, size_t numFds);
518 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
534 void*& buffer, size_t& size, int*& fds, size_t& numFds);
650 void*& buffer, size_t& size, int*& fds, size_t& numFds);
670 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
/frameworks/wilhelm/tests/sandbox/
Dgetch.c38 fd_set fds; in kbhit() local
39 FD_ZERO(&fds); // not in original posting to stackoverflow in kbhit()
40 FD_SET(0, &fds); in kbhit()
41 return select(1, &fds, NULL, NULL, &tv); in kbhit()
/frameworks/base/core/jni/
Dandroid_os_NativeHandle.cpp43 ScopedLocalRef<jintArray> fds(env, env->NewIntArray(numFds)); in MakeJavaNativeHandleObj() local
44 env->SetIntArrayRegion(fds.get(), 0, numFds, &(handle->data[0])); in MakeJavaNativeHandleObj()
51 gNativeHandleFields.constructID, fds.get(), ints.get(), false /*own*/); in MakeJavaNativeHandleObj()
64 ScopedLocalRef<jintArray> fds(env, (jintArray) env->CallObjectMethod( in MakeCppNativeHandle() local
70 const int numFds = (int) env->GetArrayLength(fds.get()); in MakeCppNativeHandle()
78 env->GetIntArrayRegion(fds.get(), 0, numFds, &(handle->data[0])); in MakeCppNativeHandle()
/frameworks/native/libs/input/tests/
DTestHelpers.h32 int fds[2]; in Pipe() local
33 ::pipe(fds); in Pipe()
35 receiveFd = fds[0]; in Pipe()
36 sendFd = fds[1]; in Pipe()
/frameworks/base/tools/bit/
Dcommand.cpp107 int fds[2]; in get_command_output() local
108 if (0 != pipe(fds)) { in get_command_output()
120 while ((dup2(fds[1], STDOUT_FILENO) == -1) && (errno == EINTR)) {} in get_command_output()
121 close(fds[1]); in get_command_output()
122 close(fds[0]); in get_command_output()
133 close(fds[1]); in get_command_output()
138 ssize_t amt = read(fds[0], buf, size); in get_command_output()
Dadb.cpp304 int fds[2]; in run_instrumentation_test() local
305 if (0 != pipe(fds)) { in run_instrumentation_test()
316 while ((dup2(fds[1], STDOUT_FILENO) == -1) && (errno == EINTR)) {} in run_instrumentation_test()
317 close(fds[1]); in run_instrumentation_test()
318 close(fds[0]); in run_instrumentation_test()
327 close(fds[1]); in run_instrumentation_test()
331 int err = read_instrumentation_results(fds[0], buf, size, callbacks); in run_instrumentation_test()
/frameworks/native/cmds/bugreportz/
Dbugreportz_test.cpp36 int fds[2]; in SetUp() local
37 ASSERT_EQ(0, pipe(fds)); in SetUp()
38 read_fd_ = fds[0]; in SetUp()
39 write_fd_ = fds[1]; in SetUp()
/frameworks/base/core/java/android/printservice/
DPrintDocument.java79 ParcelFileDescriptor[] fds = ParcelFileDescriptor.createPipe(); in getData() local
80 source = fds[0]; in getData()
81 sink = fds[1]; in getData()
/frameworks/native/libs/ui/
DFence.cpp142 status_t Fence::flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const { in flatten() argument
150 *fds++ = mFenceFd; in flatten()
156 status_t Fence::unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count) { in unflatten() argument
178 mFenceFd.reset(*fds++); in unflatten()
/frameworks/native/libs/gui/
DBufferItem.cpp126 void*& buffer, size_t& size, int*& fds, size_t& count) const { in flatten() argument
141 status_t err = mGraphicBuffer->flatten(buffer, size, fds, count); in flatten()
147 status_t err = mFence->flatten(buffer, size, fds, count); in flatten()
194 void const*& buffer, size_t& size, int const*& fds, size_t& count) { in unflatten() argument
205 status_t err = mGraphicBuffer->unflatten(buffer, size, fds, count); in unflatten()
212 status_t err = mFence->unflatten(buffer, size, fds, count); in unflatten()
DFrameTimestamps.cpp543 status_t FrameEventsDelta::flatten(void*& buffer, size_t& size, int*& fds, in flatten() argument
572 status_t status = fence->flatten(buffer, size, fds, count); in flatten()
581 int const*& fds, size_t& count) { in unflatten() argument
610 status_t status = fence->unflatten(buffer, size, fds, count); in unflatten()
655 void*& buffer, size_t& size, int*& fds, size_t& count) const { in flatten() argument
668 status_t status = d.flatten(buffer, size, fds, count); in flatten()
677 void const*& buffer, size_t& size, int const*& fds, size_t& count) { in unflatten() argument
691 status_t status = d.unflatten(buffer, size, fds, count); in unflatten()
/frameworks/base/cmds/incident/
Dmain.cpp340 int fds[2]; in main() local
341 pipe(fds); in main()
343 unique_fd readEnd(fds[0]); in main()
344 unique_fd writeEnd(fds[1]); in main()
361 ssize_t amt = TEMP_FAILURE_RETRY(read(fds[0], buf, sizeof(buf))); in main()
/frameworks/native/libs/gui/include/gui/
DBufferItem.h41 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
42 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
DIGraphicBufferProducer.h369 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
370 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
405 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
406 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
/frameworks/base/packages/MtpDocumentsProvider/tests/src/com/android/mtp/
DMtpManagerTest.java137 final ParcelFileDescriptor[] fds = ParcelFileDescriptor.createPipe(); in testCreateDocumentAndGetPartialObject() local
140 new ParcelFileDescriptor.AutoCloseOutputStream(fds[1])) { in testCreateDocumentAndGetPartialObject()
151 fds[0]); in testCreateDocumentAndGetPartialObject()
/frameworks/native/cmds/dumpstate/
DDumpstateInternal.cpp161 pollfd fds[] = { { .fd = fd, .events = POLLIN } }; in DumpFileFromFdToFd() local
162 int ret = TEMP_FAILURE_RETRY(poll(fds, arraysize(fds), 30 * 1000)); in DumpFileFromFdToFd()
/frameworks/native/libs/ui/include/ui/
DFence.h141 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
142 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
/frameworks/native/libs/ui/include_vndk/ui/
DFence.h141 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const;
142 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
/frameworks/base/core/java/com/android/internal/os/
DZygoteConnection.java636 StructPollfd fds[] = new StructPollfd[] { in handleParentProc() local
647 fds[0].fd = pipeFd; in handleParentProc()
648 fds[0].events = (short) POLLIN; in handleParentProc()
649 fds[0].revents = 0; in handleParentProc()
650 fds[0].userData = null; in handleParentProc()
652 int res = android.system.Os.poll(fds, remainingSleepTime); in handleParentProc()
658 if ((fds[0].revents & POLLIN) != 0) { in handleParentProc()

123