Lines Matching +full:uapi +full:- +full:header
1 // SPDX-License-Identifier: GPL-2.0
15 uapi,
70 ) -> Self { in new()
82 fn size_check(&self, offset: usize, size: usize) -> Result { in size_check()
96 ) -> Result { in copy_into()
108 pub(crate) fn read<T: FromBytes>(&self, offset: usize) -> Result<T> { in read()
116 pub(crate) fn write<T: ?Sized>(&self, offset: usize, obj: &T) -> Result { in write()
124 pub(crate) fn fill_zero(&self) -> Result { in fill_zero()
140 pub(crate) fn get_or_init_info(&mut self) -> &mut AllocationInfo { in get_or_init_info()
161 pub(crate) fn info_add_fd_reserve(&mut self, num_fds: usize) -> Result { in info_add_fd_reserve()
175 ) -> Result { in info_add_fd()
192 pub(crate) fn translate_fds(&mut self) -> Result<TranslatedFds> { in translate_fds()
229 pub(crate) fn looper_need_return_on_free(&self) -> bool { in looper_need_return_on_free()
299 pub(crate) fn success(self) -> Allocation { in success()
309 fn deref(&self) -> &Allocation { in deref()
315 fn deref_mut(&mut self) -> &mut Allocation { in deref_mut()
330 pub(crate) fn new(alloc: &'a mut Allocation, limit: usize) -> Self { in new()
334 pub(crate) fn read<T: FromBytes>(&self, offset: usize) -> Result<T> { in read()
341 pub(crate) fn write<T: AsBytes>(&self, offset: usize, obj: &T) -> Result { in write()
353 ) -> Result { in copy_into()
363 obj: &uapi::flat_binder_object, in transfer_binder_object()
366 ) -> Result { in transfer_binder_object()
383 // destruction of the buffer, when we see a binder or weak-binder object. in transfer_binder_object()
414 fn cleanup_object(&self, index_offset: usize) -> Result { in cleanup_object()
416 let header = self.read::<BinderObjectHeader>(offset)?; in cleanup_object() localVariable
417 match header.type_ { in cleanup_object()
420 let strong = header.type_ == BINDER_TYPE_BINDER; in cleanup_object()
430 let strong = header.type_ == BINDER_TYPE_HANDLE; in cleanup_object()
452 hdr: uapi::binder_object_header,
453 fbo: uapi::flat_binder_object,
454 fdo: uapi::binder_fd_object,
455 bbo: uapi::binder_buffer_object,
456 fdao: uapi::binder_fd_array_object,
461 Binder(&'a mut uapi::flat_binder_object),
462 Handle(&'a mut uapi::flat_binder_object),
463 Fd(&'a mut uapi::binder_fd_object),
464 Ptr(&'a mut uapi::binder_buffer_object),
465 Fda(&'a mut uapi::binder_fd_array_object),
469 pub(crate) fn read_from(reader: &mut UserSliceReader) -> Result<BinderObject> { in read_from()
482 // happen if the type header corresponds to an object type that is larger than the rest of in read_from()
495 pub(crate) fn read_from_inner<R>(reader: R) -> Result<BinderObject> in read_from_inner()
497 R: FnOnce(&mut [u8; size_of::<BinderObject>()]) -> Result<()>, in read_from_inner()
519 pub(crate) fn as_ref(&mut self) -> BinderObjectRef<'_> { in as_ref()
537 pub(crate) fn size(&self) -> usize { in size()
545 fn type_to_size(type_: u32) -> Option<usize> { in type_to_size()
547 BINDER_TYPE_WEAK_BINDER => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
548 BINDER_TYPE_BINDER => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
549 BINDER_TYPE_WEAK_HANDLE => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
550 BINDER_TYPE_HANDLE => Some(size_of::<uapi::flat_binder_object>()), in type_to_size()
551 BINDER_TYPE_FD => Some(size_of::<uapi::binder_fd_object>()), in type_to_size()
552 BINDER_TYPE_PTR => Some(size_of::<uapi::binder_buffer_object>()), in type_to_size()
553 BINDER_TYPE_FDA => Some(size_of::<uapi::binder_fd_array_object>()), in type_to_size()
587 pub(crate) fn new() -> Self { in new()
594 pub(crate) fn commit(self) -> FdsCloseOnFree { in commit()