Home
last modified time | relevance | path

Searched refs:numFds (Results 1 – 13 of 13) sorted by relevance

/system/core/libcutils/
Dnative_handle.cpp25 native_handle_t* native_handle_init(char* storage, int numFds, int numInts) { in native_handle_init() argument
33 handle->numFds = numFds; in native_handle_init()
38 native_handle_t* native_handle_create(int numFds, int numInts) { in native_handle_create() argument
39 if (numFds < 0 || numInts < 0 || numFds > NATIVE_HANDLE_MAX_FDS || in native_handle_create()
45 size_t mallocSize = sizeof(native_handle_t) + (sizeof(int) * (numFds + numInts)); in native_handle_create()
49 h->numFds = numFds; in native_handle_create()
56 native_handle_t* clone = native_handle_create(handle->numFds, handle->numInts); in native_handle_clone()
59 for (int i = 0; i < handle->numFds; i++) { in native_handle_clone()
62 clone->numFds = i; in native_handle_clone()
69 memcpy(&clone->data[handle->numFds], &handle->data[handle->numFds], in native_handle_clone()
[all …]
/system/core/libcutils/include_outside_system/cutils/
Dnative_handle.h37 int numFds; /* number of file-descriptors at &data[0] */ member
68 native_handle_t* native_handle_init(char* storage, int numFds, int numInts);
78 native_handle_t* native_handle_create(int numFds, int numInts);
/system/core/libcutils/include/cutils/
Dnative_handle.h37 int numFds; /* number of file-descriptors at &data[0] */ member
68 native_handle_t* native_handle_init(char* storage, int numFds, int numInts);
78 native_handle_t* native_handle_create(int numFds, int numInts);
/system/libhidl/base/include/hidl/
DMQDescriptor.h155 other.mHandle->numFds, other.mHandle->numInts);
157 for (int i = 0; i < other.mHandle->numFds; ++i) {
161 memcpy(&mHandle->data[other.mHandle->numFds], &other.mHandle->data[other.mHandle->numFds],
/system/libfmq/include/fmq/
DConvertMQDescriptors.h95 for (; data_index < hidlDesc.handle()->numFds; data_index++) { in unsafeHidlToAidlMQDescriptor()
98 for (; data_index < hidlDesc.handle()->numFds + hidlDesc.handle()->numInts; data_index++) { in unsafeHidlToAidlMQDescriptor()
DAidlMQDescriptorShim.h155 mHandle = native_handle_create(other.mHandle->numFds, other.mHandle->numInts);
157 for (int i = 0; i < other.mHandle->numFds; ++i) {
161 memcpy(&mHandle->data[other.mHandle->numFds], &other.mHandle->data[other.mHandle->numFds],
DAidlMessageQueue.h140 for (; data_index < shim->handle()->numFds; data_index++) {
143 for (; data_index < shim->handle()->numFds + shim->handle()->numInts; data_index++) {
DMessageQueueBase.h711 int numFds = (bufferFd != -1) ? 2 : 1; in MessageQueueBase() local
712 native_handle_t* mqHandle = native_handle_create(numFds, 0 /* numInts */); in MessageQueueBase()
/system/libhidl/transport/memory/1.0/default/
DAshmemMapper.cpp34 if (mem.handle()->numFds == 0) { in mapMemory()
/system/tools/hidl/test/java_test/
Dhidl_test_java_native.cpp878 EXPECT_EQ(reference->numFds, result->numFds); in checkNativeHandlesDataEquality()
881 int offset = reference->numFds; in checkNativeHandlesDataEquality()
1105 const int numFds = testStrings.size(); in TEST_F() local
1106 native_handle* h = native_handle_create(numFds, testData.size() /* numInts */); in TEST_F()
1107 std::memcpy(&(h->data[numFds]), testData.data(), sizeof(testData)); in TEST_F()
1108 for (size_t i = 0; i < numFds; i++) { in TEST_F()
1125 for (size_t i = 0; i < result->numFds; i++) { in TEST_F()
/system/libhwbinder/
DParcel.cpp854 + handle->numFds * sizeof(int) + handle->numInts * sizeof(int); in writeNativeHandleNoDup()
871 .num_fds = static_cast<binder_size_t>(handle->numFds), in writeNativeHandleNoDup()
1492 int numFds = (*handle)->numFds; in readNullableNativeHandleNoDup() local
1495 if (numFds < 0 || numFds > NATIVE_HANDLE_MAX_FDS) { in readNullableNativeHandleNoDup()
1505 if (nativeHandleSize != (sizeof(native_handle_t) + ((numFds + numInts) * sizeof(int)))) { in readNullableNativeHandleNoDup()
1517 if (static_cast<int>(fd_array_obj->num_fds) != numFds) { in readNullableNativeHandleNoDup()
/system/tools/hidl/test/hidl_test/
Dhidl_test_client.cpp201 EXPECT_EQ(reference->numFds, result->numFds); in checkNativeHandlesDataEquality()
204 int offset = reference->numFds; in checkNativeHandlesDataEquality()
1598 EXPECT_EQ(handle->numFds, 0); in TEST_F()
1613 EXPECT_EQ(h->numFds, 0) << " for element " << i; in TEST_F()
2402 const int numFds = testStrings.size(); in TEST_F() local
2403 native_handle* h = native_handle_create(numFds, testData.size() /* numInts */); in TEST_F()
2404 std::memcpy(&(h->data[numFds]), testData.data(), sizeof(testData)); in TEST_F()
2405 for (size_t i = 0; i < numFds; i++) { in TEST_F()
2422 for (size_t i = 0; i < result->numFds; i++) { in TEST_F()
/system/chre/host/hal_generic/common/
Dgeneric_context_hub_base.h86 return (handle != nullptr && handle->numFds >= 1) ? handle->data[0] : -1; in hidlHandleToFileDescriptor()