/frameworks/base/core/java/android/os/ |
D | NativeHandle.java | 62 private static FileDescriptor[] createFileDescriptorArray(@NonNull int[] fds) { in createFileDescriptorArray() argument 63 FileDescriptor[] list = new FileDescriptor[fds.length]; in createFileDescriptorArray() 64 for (int i = 0; i < fds.length; i++) { in createFileDescriptorArray() 66 descriptor.setInt$(fds[i]); in createFileDescriptorArray() 78 private NativeHandle(@NonNull int[] fds, @NonNull int[] ints, boolean own) { in NativeHandle() argument 79 this(createFileDescriptorArray(fds), ints, own); in NativeHandle() 87 public NativeHandle(@NonNull FileDescriptor[] fds, @NonNull int[] ints, boolean own) { in NativeHandle() argument 88 mFds = fds.clone(); in NativeHandle() 112 FileDescriptor[] fds = new FileDescriptor[mFds.length]; in dup() local 118 fds[i] = newFd; in dup() [all …]
|
/frameworks/base/apex/jobscheduler/service/jni/ |
D | com_android_server_alarm_AlarmManagerService.cpp | 79 AlarmImpl(const TimerFds &fds, int epollfd) in AlarmImpl() argument 80 : fds{fds}, epollfd{epollfd} {} in AlarmImpl() 88 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() 145 ssize_t err = read(fds[alarm_idx], &unused, sizeof(unused)); in waitForAlarm() 209 TimerFds fds; in android_server_alarm_AlarmManagerService_init() local 211 epollfd = epoll_create(fds.size()); in android_server_alarm_AlarmManagerService_init() 213 ALOGE("epoll_create(%zu) failed: %s", fds.size(), strerror(errno)); in android_server_alarm_AlarmManagerService_init() [all …]
|
/frameworks/base/services/core/java/com/android/server/biometrics/sensors/face/aidl/ |
D | AidlNativeHandleUtils.java | 48 final FileDescriptor[] fds = handle.getFileDescriptors(); in dup() local 50 res.fds = new ParcelFileDescriptor[fds.length]; in dup() 51 for (int i = 0; i < fds.length; ++i) { in dup() 52 res.fds[i] = ParcelFileDescriptor.dup(fds[i]); in dup() 70 for (ParcelFileDescriptor fd : handle.fds) { in close()
|
/frameworks/base/services/core/jni/ |
D | com_android_server_UsbAlsaMidiDevice.cpp | 57 jobjectArray fds = env->NewObjectArray(numInputs + numOutputs, sFileDescriptorClass, NULL); in android_server_UsbAlsaMidiDevice_open() local 58 if (!fds) { in android_server_UsbAlsaMidiDevice_open() 75 env->SetObjectArrayElement(fds, i, jifd.get()); in android_server_UsbAlsaMidiDevice_open() 90 env->SetObjectArrayElement(fds, i + numInputs, jifd.get()); in android_server_UsbAlsaMidiDevice_open() 110 env->SetObjectArrayElement(fds, numInputs - 1, jifd.get()); in android_server_UsbAlsaMidiDevice_open() 114 return fds; in android_server_UsbAlsaMidiDevice_open() 118 ScopedLocalRef<jobject> jifd(env, env->GetObjectArrayElement(fds, i)); in android_server_UsbAlsaMidiDevice_open() 127 static void android_server_UsbAlsaMidiDevice_close(JNIEnv *env, jobject thiz, jobjectArray fds) { in android_server_UsbAlsaMidiDevice_close() argument 134 int count = env->GetArrayLength(fds); in android_server_UsbAlsaMidiDevice_close() 136 jobject fd = env->GetObjectArrayElement(fds, i); in android_server_UsbAlsaMidiDevice_close()
|
/frameworks/native/libs/gui/ |
D | IGraphicBufferProducerFlattenables.cpp | 46 void*& buffer, size_t& size, int*& fds, size_t& count) const in flatten() argument 61 status_t result = fence->flatten(buffer, size, fds, count); in flatten() 80 void const*& buffer, size_t& size, int const*& fds, size_t& count) in unflatten() argument 96 status_t result = fence->unflatten(buffer, size, fds, count); in unflatten() 129 void*& buffer, size_t& size, int*& fds, size_t& count) const in flatten() argument 143 status_t result = frameTimestamps.flatten(buffer, size, fds, count); in flatten() 152 void const*& buffer, size_t& size, int const*& fds, size_t& count) in unflatten() argument 166 status_t result = frameTimestamps.unflatten(buffer, size, fds, count); in unflatten() 189 void*& fBuffer, size_t& size, int*& fds, size_t& count) const { in flatten() argument 199 status_t status = buffer->flatten(fBuffer, size, fds, count); in flatten() [all …]
|
D | BufferItem.cpp | 126 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()
|
/frameworks/native/libs/vr/libbufferhub/include/private/dvr/ |
D | native_handle_wrapper.h | 51 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/wilhelm/tests/sandbox/ |
D | getch.c | 38 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/native/libs/input/tests/ |
D | TestHelpers.h | 32 int fds[2]; in Pipe() local 33 ::pipe(fds); in Pipe() 35 receiveFd = fds[0]; in Pipe() 36 sendFd = fds[1]; in Pipe()
|
/frameworks/native/libs/gui/include/gui/bufferqueue/1.0/ |
D | Conversion.h | 316 void const*& buffer, size_t& size, int const*& fds, size_t& numFds); 329 void*& buffer, size_t& size, int*& fds, size_t& numFds); 390 void*& buffer, size_t& size, int*& fds, size_t& numFds); 409 void const*& buffer, size_t& size, int const*& fds, size_t& numFds); 448 void const*& buffer, size_t& size, int const*& fds, size_t& numFds); 465 void*& buffer, size_t& size, int*& fds, size_t numFds); 507 void const*& buffer, size_t& size, int const*& fds, size_t& numFds); 523 void*& buffer, size_t& size, int*& fds, size_t& numFds); 639 void*& buffer, size_t& size, int*& fds, size_t& numFds); 659 void const*& buffer, size_t& size, int const*& fds, size_t& numFds);
|
/frameworks/base/core/jni/ |
D | android_os_NativeHandle.cpp | 43 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/gui/bufferqueue/1.0/ |
D | Conversion.cpp | 211 int* fds = new int[numFds]; in convertTo() local 229 std::copy(handle->data, intsStart, fds); in convertTo() 235 int const* constFds = static_cast<int const*>(fds); in convertTo() 238 delete [] fds; in convertTo() 360 void const*& buffer, size_t& size, int const*& fds, size_t& numFds) { in unflattenFence() argument 377 *nh = native_handle_create_from_fd(*fds); in unflattenFence() 382 ++fds; in unflattenFence() 403 void*& buffer, size_t& size, int*& fds, size_t& numFds) { in flattenFence() argument 414 *fds = fd; in flattenFence() 415 ++fds; in flattenFence() [all …]
|
D | H2BGraphicBufferProducer.cpp | 160 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/base/tools/bit/ |
D | command.cpp | 107 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()
|
D | adb.cpp | 304 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/ |
D | bugreportz_test.cpp | 36 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/native/libs/binder/tests/parcel_fuzzer/ |
D | random_parcel.cpp | 81 std::vector<base::unique_fd> fds = getRandomFds(&provider); in fillRandomParcel() local 83 p->writeFileDescriptor(fds.begin()->release(), in fillRandomParcel() 87 std::make_move_iterator(fds.begin() + 1), in fillRandomParcel() 88 std::make_move_iterator(fds.end())); in fillRandomParcel()
|
D | random_fd.cpp | 31 std::vector<unique_fd> fds = provider->PickValueInArray< in getRandomFds() local 67 for (const auto& fd : fds) CHECK(fd.ok()) << fd.get() << " " << fdType; in getRandomFds() 69 return fds; in getRandomFds()
|
/frameworks/native/libs/binder/ |
D | UtilsHost.cpp | 130 pollfd fds[2]; in execute() local 132 memset(fds, 0, sizeof(fds)); in execute() 135 outPollFd = &fds[nfds++]; in execute() 139 errPollFd = &fds[nfds++]; in execute() 142 int pollRet = poll(fds, nfds, 1000 /* ms timeout */); in execute()
|
/frameworks/base/core/java/android/printservice/ |
D | PrintDocument.java | 79 ParcelFileDescriptor[] fds = ParcelFileDescriptor.createPipe(); in getData() local 80 source = fds[0]; in getData() 81 sink = fds[1]; in getData()
|
/frameworks/native/libs/gui/include/gui/ |
D | IGraphicBufferProducer.h | 356 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const; 357 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count); 393 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const; 394 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count); 686 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const; 687 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count); 724 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const; 725 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count); 787 status_t flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const; 788 status_t unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count);
|
D | BufferItem.h | 41 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);
|
/frameworks/base/services/core/java/com/android/server/notification/ |
D | PulledStats.java | 49 final ParcelFileDescriptor[] fds = ParcelFileDescriptor.createPipe(); in toParcelFileDescriptor() local 56 fds[1]); in toParcelFileDescriptor() 73 return fds[0]; in toParcelFileDescriptor()
|
/frameworks/base/cmds/incident/ |
D | main.cpp | 375 int fds[2]; in main() local 376 pipe(fds); in main() 378 unique_fd readEnd(fds[0]); in main() 379 unique_fd writeEnd(fds[1]); in main() 393 return listener->getExitCodeOrElse(stream_output(fds[0], STDOUT_FILENO)); in main() 402 return listener->getExitCodeOrElse(stream_output(fds[0], STDOUT_FILENO)); in main()
|
/frameworks/native/libs/ui/ |
D | Fence.cpp | 164 status_t Fence::flatten(void*& buffer, size_t& size, int*& fds, size_t& count) const { in flatten() argument 172 *fds++ = mFenceFd; in flatten() 178 status_t Fence::unflatten(void const*& buffer, size_t& size, int const*& fds, size_t& count) { in unflatten() argument 200 mFenceFd.reset(*fds++); in unflatten()
|