Searched defs:handle (Results 1 - 25 of 27) sorted by relevance

12

/system/core/libion/tests/
H A Dion_test_fixture.cpp48 ion_user_handle_t handle = 0; local
50 ret = ion_alloc(fd, 4096, 0, i, 0, &handle);
51 if (ret == 0 && handle != 0) {
52 ion_free(fd, handle);
H A Dmap_test.cpp35 ion_user_handle_t handle = 0; local
37 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle));
38 ASSERT_TRUE(handle != 0);
42 ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd));
48 ASSERT_EQ(0, ion_free(m_ionFd, handle));
H A Dallocate_test.cpp34 ion_user_handle_t handle = 0; local
35 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, 0, &handle));
36 ASSERT_TRUE(handle != 0);
37 ASSERT_EQ(0, ion_free(m_ionFd, handle));
49 ion_user_handle_t handle = 0; local
50 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED, &handle));
51 ASSERT_TRUE(handle != 0);
52 ASSERT_EQ(0, ion_free(m_ionFd, handle));
64 ion_user_handle_t handle = 0; local
65 ASSERT_EQ(0, ion_alloc(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED_NEEDS_SYNC, &handle));
79 ion_user_handle_t handle = 0; local
142 ion_user_handle_t handle = 0; local
[all...]
H A Dinvalid_values_test.cpp58 ion_user_handle_t handle; local
60 int ret = ion_alloc(0, 4096, 0, m_firstHeap, 0, &handle);
63 EXPECT_EQ(-EBADF, ion_alloc(-1, 4096, 0, m_firstHeap, 0, &handle));
65 EXPECT_EQ(-ENODEV, ion_alloc(m_ionFd, 4096, 0, 0, 0, &handle));
69 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, 0, 0, heapMask, 0, &handle));
71 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, -1, 0, heapMask, 0, &handle));
73 EXPECT_EQ(-EINVAL, ion_alloc(m_ionFd, 4096, -1, heapMask, 0, &handle));
74 /* NULL handle */
97 /* NULL handle */
109 /* zero handle */
160 ion_user_handle_t handle; local
[all...]
/system/core/libutils/
H A DNativeHandle.cpp23 native_handle_t* handle, bool ownsHandle) {
24 return handle ? new NativeHandle(handle, ownsHandle) : NULL;
27 NativeHandle::NativeHandle(native_handle_t* handle, bool ownsHandle) argument
28 : mHandle(handle), mOwnsHandle(ownsHandle)
22 create( native_handle_t* handle, bool ownsHandle) argument
/system/core/fastbootd/commands/
H A Dvirtual_partitions.c37 int try_handle_virtual_partition(struct protocol_handle *handle, const char *arg) argument
43 current->handler(handle, arg);
/system/core/include/utils/
H A DNativeHandle.h30 // whether the wrapper owns the handle (so that it should clean up the
31 // handle upon destruction) or not.
32 // If handle is NULL, no NativeHandle will be created.
33 static sp<NativeHandle> create(native_handle_t* handle, bool ownsHandle);
35 const native_handle_t* handle() const { function in class:android::NativeHandle
43 NativeHandle(native_handle_t* handle, bool ownsHandle);
/system/keymaster/include/keymaster/
H A Dgoogle_keymaster.h117 handle = 0;
120 keymaster_operation_handle_t handle; member in struct:keymaster::GoogleKeymaster::OpTableEntry
/system/core/fastbootd/
H A Dtransport_socket.c57 struct transport_handle handle; member in struct:socket_handle
64 struct socket_handle * handle = container_of(thandle, struct socket_handle, handle); local
65 close(handle->fd);
70 struct socket_handle *handle = calloc(sizeof(struct socket_handle), 1); local
75 handle->fd = accept(socket_transport->fd, &addr, &alen);
77 if (handle->fd < 0) {
83 return &handle->handle;
89 struct socket_handle *handle local
104 struct socket_handle *handle = container_of(thandle, struct socket_handle, handle); local
[all...]
H A Dusb_linux_client.c69 struct transport_handle handle; member in struct:usb_handle
288 return &usb_handle->handle;
/system/core/libion/
H A Dion.c61 unsigned int flags, ion_user_handle_t *handle)
71 if (handle == NULL)
77 *handle = data.handle;
81 int ion_free(int fd, ion_user_handle_t handle) argument
84 .handle = handle,
89 int ion_map(int fd, ion_user_handle_t handle, size_t length, int prot, argument
94 .handle = handle,
60 ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask, unsigned int flags, ion_user_handle_t *handle) argument
118 ion_share(int fd, ion_user_handle_t handle, int *share_fd) argument
142 ion_user_handle_t handle; local
153 ion_import(int fd, int share_fd, ion_user_handle_t *handle) argument
[all...]
H A Dion_test.c41 int _ion_alloc_test(int *fd, ion_user_handle_t *handle) argument
49 ret = ion_alloc(*fd, len, align, heap_mask, alloc_flags, handle);
59 ion_user_handle_t handle; local
61 if(_ion_alloc_test(&fd, &handle))
64 ret = ion_free(fd, handle);
66 printf("%s failed: %s %d\n", __func__, strerror(ret), handle);
77 ion_user_handle_t handle; local
80 if(_ion_alloc_test(&fd, &handle))
83 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd);
95 ret = ion_free(fd, handle);
118 ion_user_handle_t handle; local
[all...]
/system/core/libion/kernel-headers/linux/
H A Dion.h51 ion_user_handle_t handle; member in struct:ion_allocation_data
55 ion_user_handle_t handle; member in struct:ion_fd_data
60 ion_user_handle_t handle; member in struct:ion_handle_data
/system/core/libion/original-kernel-headers/linux/
H A Dion.h81 * @handle: pointer that will be populated with a cookie to use to
91 ion_user_handle_t handle; member in struct:ion_allocation_data
95 * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair
96 * @handle: a handle
97 * @fd: a file descriptor representing that handle
99 * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with
100 * the handle returned from ion alloc, and the kernel returns the file
102 * provides the file descriptor and the kernel returns the handle.
105 ion_user_handle_t handle; member in struct:ion_fd_data
114 ion_user_handle_t handle; member in struct:ion_handle_data
[all...]
/system/core/libziparchive/
H A Dzip_archive_test.cc44 ZipArchiveHandle* handle) {
46 return OpenArchive(abs_path.c_str(), handle);
56 ZipArchiveHandle handle; local
57 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle));
59 CloseArchive(handle);
63 ZipArchiveHandle handle; local
64 ASSERT_NE(0, OpenArchiveWrapper(kMissingZip, &handle));
67 ASSERT_EQ(-1, GetFileDescriptor(handle));
71 ZipArchiveHandle handle; local
72 ASSERT_EQ(0, OpenArchiveWrapper(kValidZip, &handle));
43 OpenArchiveWrapper(const std::string& name, ZipArchiveHandle* handle) argument
107 ZipArchiveHandle handle; local
127 ZipArchiveHandle handle; local
183 ZipArchiveHandle handle; local
217 ZipArchiveHandle handle; local
230 ZipArchiveHandle handle; local
[all...]
H A Dzip_archive.cc210 "Invalid handle",
233 // An invalid iteration / ziparchive handle was passed in as an input
688 ZipArchiveHandle* handle) {
690 *handle = archive;
694 int32_t OpenArchive(const char* fileName, ZipArchiveHandle* handle) { argument
697 *handle = archive;
709 void CloseArchive(ZipArchiveHandle handle) { argument
710 ZipArchive* archive = (ZipArchive*) handle;
898 int32_t StartIteration(ZipArchiveHandle handle, void** cookie_ptr, const char* prefix) { argument
899 ZipArchive* archive = (ZipArchive *) handle;
687 OpenArchiveFd(int fd, const char* debug_file_name, ZipArchiveHandle* handle) argument
918 FindEntry(const ZipArchiveHandle handle, const char* entryName, ZipEntry* data) argument
939 IterationHandle* handle = (IterationHandle *) cookie; local
1079 ExtractToMemory(ZipArchiveHandle handle, ZipEntry* entry, uint8_t* begin, uint32_t size) argument
1116 ExtractEntryToFile(ZipArchiveHandle handle, ZipEntry* entry, int fd) argument
1162 GetFileDescriptor(const ZipArchiveHandle handle) argument
[all...]
/system/core/adb/
H A Dusb_windows.c70 /// Checks if there is opened usb handle in handle_list for this device.
73 /// Checks if there is opened usb handle in handle_list for this device.
77 /// Registers opened usb handle (adds it to handle_list).
78 int register_new_device(usb_handle* handle);
81 int recognized_device(usb_handle* handle);
100 /// Writes data to the opened usb handle
101 int usb_write(usb_handle* handle, const void* data, int len);
103 /// Reads data using the opened usb handle
104 int usb_read(usb_handle *handle, void* data, int len);
106 /// Cleans up opened usb handle
147 register_new_device(usb_handle* handle) argument
259 usb_write(usb_handle* handle, const void* data, int len) argument
304 usb_read(usb_handle *handle, void* data, int len) argument
345 usb_cleanup_handle(usb_handle* handle) argument
363 usb_kick(usb_handle* handle) argument
376 usb_close(usb_handle* handle) argument
400 usb_name(usb_handle* handle) argument
410 recognized_device(usb_handle* handle) argument
453 usb_handle* handle = NULL; local
[all...]
H A Dusb_osx.c258 usb_handle* handle = CheckInterface((IOUSBInterfaceInterface**)iface, local
260 if (handle == NULL) {
267 register_usb_transport(handle, (serial[0] ? serial : NULL), devpath, 1);
276 handle,
277 &handle->usbNotification);
288 usb_handle *handle = (usb_handle *)refCon; local
291 if (!handle) {
292 DBG("ERR: NULL handle\n");
296 IOObjectRelease(handle->usbNotification);
297 usb_kick(handle);
306 usb_handle* handle = NULL; local
452 usb_write(usb_handle *handle, const void *buf, int len) argument
492 usb_read(usb_handle *handle, void *buf, int len) argument
532 usb_close(usb_handle *handle) argument
537 usb_kick(usb_handle *handle) argument
[all...]
/system/core/fastboot/
H A Dusb_osx.c67 static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) { argument
171 if ((*interface)->GetInterfaceClass(interface, &handle->info.ifc_class) != 0 ||
172 (*interface)->GetInterfaceSubClass(interface, &handle->info.ifc_subclass) != 0 ||
173 (*interface)->GetInterfaceProtocol(interface, &handle->info.ifc_protocol) != 0)
179 handle->info.has_bulk_in = 0;
180 handle->info.has_bulk_out = 0;
201 handle->info.has_bulk_in = 1;
202 handle->bulkIn = endpoint;
204 handle->info.has_bulk_out = 1;
205 handle
260 try_device(io_service_t device, usb_handle *handle) argument
381 init_usb(ifc_match_func callback, usb_handle **handle) argument
455 usb_handle *handle = NULL; local
[all...]
H A Dusb_windows.c71 int recognized_device(usb_handle* handle, ifc_match_func callback);
76 /// Writes data to the opened usb handle
77 int usb_write(usb_handle* handle, const void* data, int len);
79 /// Reads data using the opened usb handle
80 int usb_read(usb_handle *handle, void* data, int len);
82 /// Cleans up opened usb handle
83 void usb_cleanup_handle(usb_handle* handle);
85 /// Cleans up (but don't close) opened usb handle
86 void usb_kick(usb_handle* handle);
88 /// Closes opened usb handle
155 usb_write(usb_handle* handle, const void* data, int len) argument
197 usb_read(usb_handle *handle, void* data, int len) argument
234 usb_cleanup_handle(usb_handle* handle) argument
252 usb_kick(usb_handle* handle) argument
261 usb_close(usb_handle* handle) argument
278 recognized_device(usb_handle* handle, ifc_match_func callback) argument
330 usb_handle* handle = NULL; local
[all...]
/system/media/audio_utils/
H A Dtinysndfile.c70 SNDFILE *handle = (SNDFILE *) malloc(sizeof(SNDFILE)); local
71 handle->mode = SFM_READ;
72 handle->temp = NULL;
73 handle->stream = stream;
74 handle->info.format = SF_FORMAT_WAV;
172 handle->bytesPerFrame = bytesPerFrame;
173 handle->info.samplerate = samplerate;
174 handle->info.channels = channels;
177 handle->info.format |= SF_FORMAT_PCM_U8;
180 handle
303 SNDFILE *handle = (SNDFILE *) malloc(sizeof(SNDFILE)); local
330 sf_close(SNDFILE *handle) argument
351 sf_readf_short(SNDFILE *handle, short *ptr, sf_count_t desiredFrames) argument
396 sf_readf_float(SNDFILE *handle, float *ptr, sf_count_t desiredFrames) argument
443 sf_readf_int(SNDFILE *handle, int *ptr, sf_count_t desiredFrames) argument
490 sf_writef_short(SNDFILE *handle, const short *ptr, sf_count_t desiredFrames) argument
527 sf_writef_float(SNDFILE *handle, const float *ptr, sf_count_t desiredFrames) argument
[all...]
/system/core/libnativebridge/
H A Dnative_bridge.cc177 void* handle = dlopen(nb_library_filename, RTLD_LAZY); local
178 if (handle != nullptr) {
179 callbacks = reinterpret_cast<NativeBridgeCallbacks*>(dlsym(handle,
183 // Store the handle for later.
184 native_bridge_handle = handle;
187 dlclose(handle);
191 dlclose(handle);
473 void* NativeBridgeGetTrampoline(void* handle, const char* name, const char* shorty, argument
476 return callbacks->getTrampoline(handle, name, shorty, len);
/system/core/include/system/
H A Dsound_trigger.h88 sound_trigger_module_handle_t handle; member in struct:sound_trigger_module_descriptor
197 audio_io_handle_t capture_handle; /* IO handle that will be used for capture.
H A Dwindow.h117 buffer_handle_t handle; member in struct:ANativeWindowBuffer
196 * cannot handle arbitrary rotations.
/system/core/sdcard/
H A Dsdcard.c159 struct handle { struct
1223 struct handle *h;
1259 struct handle *h = id_to_ptr(req->fh);
1288 struct handle *h = id_to_ptr(req->fh);
1342 struct handle *h = id_to_ptr(req->fh);
1361 struct handle *h = id_to_ptr(req->fh);

Completed in 601 milliseconds

12