Home
last modified time | relevance | path

Searched refs:native_handle_t (Results 1 – 21 of 21) 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()
26 if ((uintptr_t) storage % alignof(native_handle_t)) { in native_handle_init()
31 native_handle_t* handle = (native_handle_t*) storage; in native_handle_init()
32 handle->version = sizeof(native_handle_t); in native_handle_init()
38 native_handle_t* native_handle_create(int numFds, int numInts) { in native_handle_create()
45 size_t mallocSize = sizeof(native_handle_t) + (sizeof(int) * (numFds + numInts)); in native_handle_create()
46 native_handle_t* h = static_cast<native_handle_t*>(malloc(mallocSize)); in native_handle_create()
48 h->version = sizeof(native_handle_t); in native_handle_create()
55 native_handle_t* native_handle_clone(const native_handle_t* handle) { in native_handle_clone()
56 native_handle_t* clone = native_handle_create(handle->numFds, handle->numInts); in native_handle_clone()
[all …]
/system/core/libcutils/include_vndk/cutils/
Dnative_handle.h31 alignas(native_handle_t) char (name)[ \
32 sizeof(native_handle_t) + sizeof(int) * ((maxFds) + (maxInts))]
47 } native_handle_t; typedef
49 typedef const native_handle_t* buffer_handle_t;
59 int native_handle_close(const native_handle_t* h);
68 native_handle_t* native_handle_init(char* storage, int numFds, int numInts);
78 native_handle_t* native_handle_create(int numFds, int numInts);
87 native_handle_t* native_handle_clone(const native_handle_t* handle);
99 int native_handle_delete(native_handle_t* h);
/system/core/libcutils/include/cutils/
Dnative_handle.h31 alignas(native_handle_t) char (name)[ \
32 sizeof(native_handle_t) + sizeof(int) * ((maxFds) + (maxInts))]
47 } native_handle_t; typedef
49 typedef const native_handle_t* buffer_handle_t;
59 int native_handle_close(const native_handle_t* h);
68 native_handle_t* native_handle_init(char* storage, int numFds, int numInts);
78 native_handle_t* native_handle_create(int numFds, int numInts);
87 native_handle_t* native_handle_clone(const native_handle_t* handle);
99 int native_handle_delete(native_handle_t* h);
/system/core/libutils/include/utils/
DNativeHandle.h23 typedef struct native_handle native_handle_t; typedef
33 static sp<NativeHandle> create(native_handle_t* handle, bool ownsHandle);
35 const native_handle_t* handle() const { in handle()
43 NativeHandle(native_handle_t* handle, bool ownsHandle);
46 native_handle_t* mHandle;
/system/libhidl/base/
DHidlSupport.cpp48 hidl_handle::hidl_handle(const native_handle_t* handle) : hidl_handle() { in hidl_handle()
84 hidl_handle &hidl_handle::operator=(const native_handle_t *native_handle) { in operator =()
102 void hidl_handle::setTo(native_handle_t* handle, bool shouldOwn) { in setTo()
108 const native_handle_t* hidl_handle::operator->() const { in operator ->()
113 hidl_handle::operator const native_handle_t *() const { in operator const native_handle_t*()
118 const native_handle_t *hidl_handle::getNativeHandle() const { in getNativeHandle()
131 native_handle_t *handle = const_cast<native_handle_t*>( in freeHandle()
132 static_cast<const native_handle_t*>(mHandle)); in freeHandle()
299 native_handle_t* handle = native_handle_create(1, 0); in getInstance()
/system/core/libutils/
DNativeHandle.cpp22 sp<NativeHandle> NativeHandle::create(native_handle_t* handle, bool ownsHandle) { in create()
26 NativeHandle::NativeHandle(native_handle_t* handle, bool ownsHandle) in NativeHandle()
/system/libhidl/transport/allocator/1.0/default/
DAshmemAllocator.cpp37 native_handle_t* handle = native_handle_create(1, 0); in allocateOne()
49 native_handle_close(const_cast<native_handle_t *>(memory.handle())); in cleanup()
50 native_handle_delete(const_cast<native_handle_t *>(memory.handle())); in cleanup()
/system/libhidl/base/include/hidl/
DMQDescriptor.h65 native_handle_t* nHandle, size_t size);
68 MQDescriptor(size_t bufferSize, native_handle_t* nHandle,
94 inline const ::native_handle_t *handle() const { in handle()
98 inline ::native_handle_t *handle() { in handle()
142 ::android::hardware::details::hidl_pointer<native_handle_t> mHandle;
170 native_handle_t* nhandle, in MQDescriptor()
185 MQDescriptor<T, flavor>::MQDescriptor(size_t bufferSize, native_handle_t *nHandle, in MQDescriptor()
DHidlSupport.h95 hidl_handle(const native_handle_t *handle);
106 hidl_handle &operator=(const native_handle_t *native_handle);
110 void setTo(native_handle_t* handle, bool shouldOwn = false);
112 const native_handle_t* operator->() const;
115 operator const native_handle_t *() const;
118 const native_handle_t *getNativeHandle() const;
126 details::hidl_pointer<const native_handle_t> mHandle __attribute__ ((aligned(8)));
233 hidl_memory(const hidl_string &name, const native_handle_t *handle, size_t size) in hidl_memory()
276 const native_handle_t* handle() const { in handle()
/system/libhwbinder/include/hwbinder/
DParcel.h119 status_t writeEmbeddedNativeHandle(const native_handle_t *handle,
181 size_t parent_offset, const native_handle_t **handle) const;
183 size_t parent_offset, const native_handle_t **handle) const;
184 status_t readNativeHandleNoDup(const native_handle_t **handle) const;
185 status_t readNullableNativeHandleNoDup(const native_handle_t **handle) const;
218 status_t readNullableNativeHandleNoDup(const native_handle_t **handle,
/system/libhwbinder/
DParcel.cpp1047 status_t Parcel::writeNativeHandleNoDup(const native_handle_t *handle, in writeNativeHandleNoDup()
1060 size_t native_handle_size = sizeof(native_handle_t) in writeNativeHandleNoDup()
1080 .parent_offset = offsetof(native_handle_t, data), in writeNativeHandleNoDup()
1086 status_t Parcel::writeNativeHandleNoDup(const native_handle_t *handle) in writeNativeHandleNoDup()
1091 status_t Parcel::writeEmbeddedNativeHandle(const native_handle_t *handle, in writeEmbeddedNativeHandle()
1672 const native_handle_t **handle) const in readEmbeddedNativeHandle()
1681 status_t Parcel::readNullableNativeHandleNoDup(const native_handle_t **handle, in readNullableNativeHandleNoDup()
1696 if (nativeHandleSize < sizeof(native_handle_t)) { in readNullableNativeHandleNoDup()
1727 if (nativeHandleSize != (sizeof(native_handle_t) + ((numFds + numInts) * sizeof(int)))) { in readNullableNativeHandleNoDup()
1749 if (fd_array_obj->parent_offset != offsetof(native_handle_t, data)) { in readNullableNativeHandleNoDup()
[all …]
/system/tools/hidl/test/java_test/
Dhidl_test_java_native.cpp708 static void checkNativeHandlesDataEquality(const native_handle_t* reference, in checkNativeHandlesDataEquality()
709 const native_handle_t* result) { in checkNativeHandlesDataEquality()
744 native_handle_t* h = native_handle_create(0, testHandleData.size()); in TEST_F()
787 const native_handle_t* result = safeUnion.f().getNativeHandle(); in TEST_F()
831 native_handle_t* h = native_handle_create(0, testData.size()); in TEST_F()
909 const native_handle_t* reference = testHandles[i].getNativeHandle(); in TEST_F()
910 const native_handle_t* result = safeUnion.c()[i].getNativeHandle(); in TEST_F()
964 const native_handle_t* result = safeUnion.a().getNativeHandle(); in TEST_F()
/system/libhidl/transport/
DHidlBinderSupport.cpp58 const native_handle_t *handle; in readEmbeddedFromParcel()
85 const native_handle_t *handle; in readEmbeddedFromParcel()
/system/core/healthd/
Dcharger_test.cpp103 native_handle_t* nativeHandle = native_handle_create(1, 0); in createHidlHandle()
/system/tools/hidl/c2hal/test/
Dtest.h99 typedef void (*special_types)(const native_handle_t* a, int b);
/system/libhidl/transport/include/hidl/
DHidlBinderSupport.h148 const native_handle_t *_hidl_mq_handle_ptr; in readEmbeddedFromParcel()
/system/tools/hidl/test/hidl_test/
Dhidl_test_client.cpp202 static void checkNativeHandlesDataEquality(const native_handle_t* reference, in checkNativeHandlesDataEquality()
203 const native_handle_t* result) { in checkNativeHandlesDataEquality()
1318 native_handle_t *handle = native_handle_create(0, 0); in TEST_F()
1634 const native_handle_t* handle = myHandle.h.getNativeHandle(); in TEST_F()
1649 const native_handle_t *h = handles[i]; in TEST_F()
2280 native_handle_t* h = native_handle_create(0, testData.size()); in TEST_F()
2358 const native_handle_t* reference = testHandles[i].getNativeHandle(); in TEST_F()
2359 const native_handle_t* result = safeUnion.c()[i].getNativeHandle(); in TEST_F()
2413 const native_handle_t* result = safeUnion.a().getNativeHandle(); in TEST_F()
/system/libfmq/include/fmq/
DMessageQueue.h676 native_handle_t* mqHandle = in MessageQueue()
1170 const native_handle_t* handle = mDesc->handle(); in mapGrantorDescr()
/system/hardware/interfaces/suspend/1.0/default/
DSystemSuspendUnitTest.cpp180 native_handle_t* handle = native_handle_create(1, 0); in getDebugDump()
/system/chre/host/hal_generic/
Dgeneric_context_hub.cc67 const native_handle_t *handle = hh.getNativeHandle(); in hidlHandleToFileDescriptor()
/system/libhidl/
Dtest_main.cpp175 native_handle_t* testHandle = native_handle_create(0 /* numInts */, 0 /* numFds */); in TEST_F()