Home
last modified time | relevance | path

Searched refs:native_handle_t (Results 1 – 22 of 22) 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_outside_system/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.cpp46 hidl_handle::hidl_handle(const native_handle_t* handle) : hidl_handle() { in hidl_handle()
82 hidl_handle &hidl_handle::operator=(const native_handle_t *native_handle) { in operator =()
100 void hidl_handle::setTo(native_handle_t* handle, bool shouldOwn) { in setTo()
106 const native_handle_t* hidl_handle::operator->() const { in operator ->()
111 hidl_handle::operator const native_handle_t *() const { in operator const native_handle_t*()
116 const native_handle_t *hidl_handle::getNativeHandle() const { in getNativeHandle()
129 native_handle_t *handle = const_cast<native_handle_t*>( in freeHandle()
130 static_cast<const native_handle_t*>(mHandle)); in freeHandle()
302 native_handle_t* handle = native_handle_create(1, 0); in getInstance()
/system/libhidl/base/include/hidl/
DMQDescriptor.h35 native_handle_t* nHandle, size_t size);
38 MQDescriptor(size_t bufferSize, native_handle_t* nHandle,
60 inline const ::native_handle_t *handle() const { in handle()
64 inline ::native_handle_t *handle() { in handle()
73 ::android::hardware::details::hidl_pointer<native_handle_t> mHandle;
100 native_handle_t* nhandle, size_t size) in MQDescriptor()
109 MQDescriptor<T, flavor>::MQDescriptor(size_t bufferSize, native_handle_t* nHandle, in MQDescriptor()
DHidlSupport.h101 hidl_handle(const native_handle_t *handle);
112 hidl_handle &operator=(const native_handle_t *native_handle);
116 void setTo(native_handle_t* handle, bool shouldOwn = false);
118 const native_handle_t* operator->() const;
121 operator const native_handle_t *() const;
124 const native_handle_t *getNativeHandle() const;
132 details::hidl_pointer<const native_handle_t> mHandle;
241 hidl_memory(const hidl_string &name, const native_handle_t *handle, size_t size) in hidl_memory()
284 const native_handle_t* handle() const { in handle()
/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/libfmq/include/fmq/
DAidlMQDescriptorShim.h36 native_handle_t* nHandle, size_t size);
46 AidlMQDescriptorShim(size_t bufferSize, native_handle_t* nHandle, size_t messageSize,
70 inline const ::native_handle_t* handle() const { return mHandle; } in handle()
72 inline ::native_handle_t* handle() { return mHandle; } in handle()
79 native_handle_t* mHandle = nullptr;
135 const std::vector<android::hardware::GrantorDescriptor>& grantors, native_handle_t* nhandle, in AidlMQDescriptorShim()
169 AidlMQDescriptorShim<T, flavor>::AidlMQDescriptorShim(size_t bufferSize, native_handle_t* nHandle, in AidlMQDescriptorShim()
DMessageQueueBase.h712 native_handle_t* mqHandle = native_handle_create(numFds, 0 /* numInts */); in MessageQueueBase()
1256 const native_handle_t* handle = mDesc->handle(); in mapGrantorDescr()
/system/libhwbinder/include/hwbinder/
DParcel.h125 status_t writeEmbeddedNativeHandle(const native_handle_t *handle,
179 size_t parent_offset, const native_handle_t **handle) const;
181 size_t parent_offset, const native_handle_t **handle) const;
182 status_t readNativeHandleNoDup(const native_handle_t **handle) const;
183 status_t readNullableNativeHandleNoDup(const native_handle_t **handle) const;
216 status_t readNullableNativeHandleNoDup(const native_handle_t **handle,
/system/libhwbinder/
DParcel.cpp840 status_t Parcel::writeNativeHandleNoDup(const native_handle_t *handle, in writeNativeHandleNoDup()
853 size_t native_handle_size = sizeof(native_handle_t) in writeNativeHandleNoDup()
873 .parent_offset = offsetof(native_handle_t, data), in writeNativeHandleNoDup()
879 status_t Parcel::writeNativeHandleNoDup(const native_handle_t *handle) in writeNativeHandleNoDup()
884 status_t Parcel::writeEmbeddedNativeHandle(const native_handle_t *handle, in writeEmbeddedNativeHandle()
1424 const native_handle_t **handle) const in readEmbeddedNativeHandle()
1433 status_t Parcel::readNullableNativeHandleNoDup(const native_handle_t **handle, in readNullableNativeHandleNoDup()
1467 if (nativeHandleSize < sizeof(native_handle_t)) { in readNullableNativeHandleNoDup()
1505 if (nativeHandleSize != (sizeof(native_handle_t) + ((numFds + numInts) * sizeof(int)))) { in readNullableNativeHandleNoDup()
1527 if (fd_array_obj->parent_offset != offsetof(native_handle_t, data)) { in readNullableNativeHandleNoDup()
[all …]
/system/libhidl/transport/
DHidlBinderSupport.cpp61 const native_handle_t *handle; in readEmbeddedFromParcel()
88 const native_handle_t *handle; in readEmbeddedFromParcel()
/system/tools/hidl/test/java_test/
Dhidl_test_java_native.cpp869 static void checkNativeHandlesDataEquality(const native_handle_t* reference, in checkNativeHandlesDataEquality()
870 const native_handle_t* result) { in checkNativeHandlesDataEquality()
905 native_handle_t* h = native_handle_create(0, testHandleData.size()); in TEST_F()
948 const native_handle_t* result = safeUnion.f().getNativeHandle(); in TEST_F()
989 native_handle_t* h = native_handle_create(0, testData.size()); in TEST_F()
1067 const native_handle_t* reference = testHandles[i].getNativeHandle(); in TEST_F()
1068 const native_handle_t* result = safeUnion.c()[i].getNativeHandle(); in TEST_F()
1122 const native_handle_t* result = safeUnion.a().getNativeHandle(); in TEST_F()
/system/tools/hidl/c2hal/test/
Dtest.h99 typedef void (*special_types)(const native_handle_t* a, int b);
/system/core/healthd/
Dcharger_test.cpp112 native_handle_t* nativeHandle = native_handle_create(1, 0); in createHidlHandle()
/system/libhidl/transport/include/hidl/
DHidlBinderSupport.h141 const native_handle_t *_hidl_mq_handle_ptr; in readEmbeddedFromParcel()
/system/tools/hidl/test/hidl_test/
Dhidl_test_client.cpp193 static void checkNativeHandlesDataEquality(const native_handle_t* reference, in checkNativeHandlesDataEquality()
194 const native_handle_t* result) { in checkNativeHandlesDataEquality()
1293 native_handle_t *handle = native_handle_create(0, 0); in TEST_F()
1596 const native_handle_t* handle = myHandle.h.getNativeHandle(); in TEST_F()
1611 const native_handle_t *h = handles[i]; in TEST_F()
2286 native_handle_t* h = native_handle_create(0, testData.size()); in TEST_F()
2364 const native_handle_t* reference = testHandles[i].getNativeHandle(); in TEST_F()
2365 const native_handle_t* result = safeUnion.c()[i].getNativeHandle(); in TEST_F()
2419 const native_handle_t* result = safeUnion.a().getNativeHandle(); in TEST_F()
/system/libfmq/tests/
Dfmq_unit_tests.cpp407 native_handle_t* mqHandle = native_handle_create(2 /* numFds */, 0 /* numInts */); in TEST_F()
429 native_handle_t* mqHandle = native_handle_create(2 /* numFds */, 0 /* numInts */); in TEST_F()
/system/chre/host/hal_generic/common/
Dgeneric_context_hub_base.h85 const native_handle_t *handle = hh.getNativeHandle(); in hidlHandleToFileDescriptor()
/system/libhidl/
Dtest_main.cpp200 native_handle_t* testHandle = native_handle_create(0 /* numInts */, 0 /* numFds */); in TEST_F()