Lines Matching +full:uapi +full:- +full:header

1 // SPDX-License-Identifier: GPL-2.0
15 uapi,
72 ) -> Self { in new()
85 fn size_check(&self, offset: usize, size: usize) -> Result { in size_check()
99 ) -> Result { in copy_into()
111 pub(crate) fn read<T: FromBytes>(&self, offset: usize) -> Result<T> { in read()
119 pub(crate) fn write<T: ?Sized>(&self, offset: usize, obj: &T) -> Result { in write()
127 pub(crate) fn fill_zero(&self) -> Result { in fill_zero()
143 pub(crate) fn get_or_init_info(&mut self) -> &mut AllocationInfo { in get_or_init_info()
164 pub(crate) fn info_add_fd_reserve(&mut self, num_fds: usize) -> Result { in info_add_fd_reserve()
178 ) -> Result { in info_add_fd()
195 pub(crate) fn translate_fds(&mut self) -> Result<TranslatedFds> { in translate_fds()
231 pub(crate) fn looper_need_return_on_free(&self) -> bool { in looper_need_return_on_free()
298 pub(crate) fn success(self) -> Allocation { in success()
308 fn deref(&self) -> &Allocation { in deref()
314 fn deref_mut(&mut self) -> &mut Allocation { in deref_mut()
329 pub(crate) fn new(alloc: &'a mut Allocation, limit: usize) -> Self { in new()
333 pub(crate) fn read<T: FromBytes>(&self, offset: usize) -> Result<T> { in read()
340 pub(crate) fn write<T: AsBytes>(&self, offset: usize, obj: &T) -> Result { in write()
352 ) -> Result { in copy_into()
362 obj: &uapi::flat_binder_object, in transfer_binder_object()
365 ) -> Result { in transfer_binder_object()
382 // destruction of the buffer, when we see a binder or weak-binder object. in transfer_binder_object()
413 fn cleanup_object(&self, index_offset: usize) -> Result { in cleanup_object()
415 let header = self.read::<BinderObjectHeader>(offset)?; in cleanup_object() localVariable
416 match header.type_ { in cleanup_object()
419 let strong = header.type_ == BINDER_TYPE_BINDER; in cleanup_object()
429 let strong = header.type_ == BINDER_TYPE_HANDLE; in cleanup_object()
451 hdr: uapi::binder_object_header,
452 fbo: uapi::flat_binder_object,
453 fdo: uapi::binder_fd_object,
454 bbo: uapi::binder_buffer_object,
455 fdao: uapi::binder_fd_array_object,
460 Binder(&'a mut uapi::flat_binder_object),
461 Handle(&'a mut uapi::flat_binder_object),
462 Fd(&'a mut uapi::binder_fd_object),
463 Ptr(&'a mut uapi::binder_buffer_object),
464 Fda(&'a mut uapi::binder_fd_array_object),
468 pub(crate) fn read_from(reader: &mut UserSliceReader) -> Result<BinderObject> { in read_from()
481 // happen if the type header corresponds to an object type that is larger than the rest of in read_from()
494 pub(crate) fn read_from_inner<R>(reader: R) -> Result<BinderObject> in read_from_inner()
496 R: FnOnce(&mut [u8; size_of::<BinderObject>()]) -> Result<()>, in read_from_inner()
518 pub(crate) fn as_ref(&mut self) -> BinderObjectRef<'_> { in as_ref()
536 pub(crate) fn size(&self) -> usize { in size()
544 fn type_to_size(type_: u32) -> Option<usize> { in type_to_size()
546 BINDER_TYPE_WEAK_BINDER => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
547 BINDER_TYPE_BINDER => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
548 BINDER_TYPE_WEAK_HANDLE => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
549 BINDER_TYPE_HANDLE => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
550 BINDER_TYPE_FD => Some(size_of::<uapi::binder_fd_object>()), in type_to_size()
551 BINDER_TYPE_PTR => Some(size_of::<uapi::binder_buffer_object>()), in type_to_size()
552 BINDER_TYPE_FDA => Some(size_of::<uapi::binder_fd_array_object>()), in type_to_size()
586 pub(crate) fn new() -> Self { in new()
593 pub(crate) fn commit(self) -> FdsCloseOnFree { in commit()