| /linux/rust/kernel/ |
| H A D | task.rs | 202 pub fn as_ptr(&self) -> *mut bindings::task_struct { in as_ptr() method 210 unsafe { *ptr::addr_of!((*self.as_ptr()).pid) } in pid() 217 Kuid::from_raw(unsafe { bindings::task_uid(self.as_ptr()) }) in uid() 224 Kuid::from_raw(unsafe { bindings::task_euid(self.as_ptr()) }) in euid() 231 unsafe { bindings::signal_pending(self.as_ptr()) != 0 } in signal_pending() 238 let ptr = unsafe { bindings::task_get_pid_ns(self.as_ptr()) }; in get_pid_ns() 254 Some(pidns) => pidns.as_ptr(), in tgid_nr_ns() 261 unsafe { bindings::task_tgid_nr_ns(self.as_ptr(), pidns) } in tgid_nr_ns() 269 unsafe { bindings::wake_up_process(self.as_ptr()) }; in wake_up() 281 let mm = unsafe { (*self.as_ptr()).mm }; in mm() [all …]
|
| H A D | bitmap.rs | 76 pub fn as_ptr(&self) -> *const usize { in as_ptr() method 173 unsafe { self.repr.ptr.as_ptr() } in deref() 192 unsafe { self.repr.ptr.as_ptr() } in deref_mut() 222 unsafe { bindings::bitmap_free(self.repr.ptr.as_ptr()) }; in drop() 341 unsafe { bindings::set_bit(index, self.as_ptr().cast_mut()) }; in set_bit_atomic() 392 unsafe { bindings::clear_bit(index, self.as_ptr().cast_mut()) }; in clear_bit_atomic() 422 src.as_ptr(), in copy_and_extend() 452 let index = unsafe { bindings::_find_last_bit(self.as_ptr(), self.len()) }; in last_bit() 473 let index = unsafe { bindings::_find_next_bit(self.as_ptr(), self.len(), start) }; in next_bit() 493 let index = unsafe { bindings::_find_next_zero_bit(self.as_ptr(), self.len(), start) }; in next_zero_bit() [all …]
|
| H A D | pid_namespace.rs | 26 pub fn as_ptr(&self) -> *mut bindings::pid_namespace { in as_ptr() method 48 unsafe { bindings::get_pid_ns(self.as_ptr()) }; in inc_ref() 54 unsafe { bindings::put_pid_ns(obj.cast().as_ptr()) } in dec_ref()
|
| H A D | dma.rs | 606 T::size(self.cpu_addr.as_ptr()) in size() 611 pub fn as_ptr(&self) -> *const T { in as_ptr() method 612 self.cpu_addr.as_ptr() in as_ptr() 619 self.cpu_addr.as_ptr() in as_mut_ptr() 640 unsafe { &*self.as_ptr() } in as_ref() 966 let size = T::size(self.cpu_addr.as_ptr()); in drop() 974 self.cpu_addr.as_ptr().cast(), in drop() 1119 self.cpu_handle.as_ptr(), in drop() 1164 $crate::dma::Coherent::as_ptr(dma), $($proj)*
|
| H A D | mm.rs | 68 unsafe { bindings::mmdrop(obj.cast().as_ptr()) }; in dec_ref() 104 unsafe { bindings::mmput(obj.cast().as_ptr()) }; in dec_ref() 295 unsafe { bindings::vma_end_read(self.vma.as_ptr()) }; in drop()
|
| H A D | i2c.rs | 119 Some(table) => table.as_ptr(), in register() 124 Some(table) => table.as_ptr(), in register() 129 Some(table) => table.as_ptr(), in register() 211 let raw_id = unsafe { bindings::i2c_match_id(table.as_ptr(), dev.as_raw()) }; in i2c_id_info() 408 Ok(unsafe { (&*adapter.as_ptr().cast::<I2cAdapter<device::Normal>>()).into() }) in get() 585 unsafe { bindings::i2c_unregister_device(self.0.as_ptr()) } in drop()
|
| H A D | scatterlist.rs | 213 bindings::dma_map_sgtable(dev.as_raw(), sgt.as_ptr(), dir.into(), 0) in new() 232 // - `self.sgt.as_ptr()` is a valid pointer to a `struct sg_table` by the type invariants in drop() 237 bindings::dma_unmap_sgtable(self.dev.as_raw(), self.sgt.as_ptr(), self.dir.into(), 0) in drop() 350 page_vec.push(page.as_ptr(), flags)?; in new() 370 let sgt = unsafe { &raw mut (*this.as_ptr()).sgt }.cast(); in new()
|
| H A D | rbtree.rs | 463 NonNull::new(best.as_ptr()).map(|current| { in cursor_lower_bound_mut() 484 NonNull::new(best.as_ptr()).map(|current| { in cursor_lower_bound() 843 let this = unsafe { container_of!(node.as_ptr(), Node<K, V>, links) }; in to_key_value() 876 Direction::Prev => bindings::rb_prev(self.current.as_ptr()), in get_neighbor_raw() 877 Direction::Next => bindings::rb_next(self.current.as_ptr()), in get_neighbor_raw() 923 let this = unsafe { container_of!(self.current.as_ptr(), Node<K, V>, links) }; in remove_current() 953 let neighbor = neighbor.as_ptr(); in remove_neighbor() 1028 Direction::Prev => bindings::rb_prev(self.current.as_ptr()), in get_neighbor_raw() 1029 Direction::Next => bindings::rb_next(self.current.as_ptr()), in get_neighbor_raw() 1065 let this = unsafe { container_of!(node.as_ptr(), Nod in to_key_value_raw() [all...] |
| H A D | sync.rs | 110 pub fn as_ptr(&self) -> *mut bindings::lock_class_key { 118 // SAFETY: `self.as_ptr()` was registered with lockdep and `self` is pinned, so the address 120 unsafe { bindings::lockdep_unregister_key(self.as_ptr()) } 84 pub(crate) fn as_ptr(&self) -> *mut bindings::lock_class_key { as_ptr() method
|
| H A D | configfs.rs | 160 item_type.as_ptr(), in new() 169 kernel::static_lock_class!().as_ptr(), in new() 265 let name = name.to_bytes_with_nul().as_ptr(); in new() 268 bindings::config_group_init_type_name(place, name.cast(), item_type.as_ptr()) in new() 756 ct_owner: owner.as_ptr(), 773 ct_owner: owner.as_ptr(), 790 fn as_ptr(&self) -> *const bindings::config_item_type { 791 fn as_ptr(&self) -> *const bindings::config_item_type { as_ptr() method
|
| H A D | xarray.rs | 66 let ptr = ptr.as_ptr(); in drop() 196 unsafe { T::borrow(ptr.as_ptr()) } in get() 204 unsafe { T::borrow_mut(ptr.as_ptr()) } in get_mut()
|
| H A D | print.rs | 115 format_string.as_ptr(), 116 module_name.as_ptr(), 136 format_strings::CONT.as_ptr(),
|
| H A D | auxiliary.rs | 61 (*adrv.get()).id_table = T::ID_TABLE.as_ptr(); in register() 300 let adev: *mut bindings::auxiliary_device = obj.cast().as_ptr(); in dec_ref() 398 unsafe { bindings::auxiliary_device_delete(self.0.as_ptr()) }; in drop() 404 unsafe { bindings::auxiliary_device_uninit(self.0.as_ptr()) }; in drop()
|
| H A D | str.rs | 194 c_str.as_ptr().cast() in as_char_ptr_in_const_context() 341 self.as_ptr().cast() in as_char_ptr() 617 s.as_bytes().as_ptr(), in write_str() 798 unsafe { kstrtobool_raw(stack_string.as_ptr()) } in kstrtobool_bytes() 857 let ptr = unsafe { bindings::memchr(buf.as_ptr().cast(), 0, f.bytes_written() - 1) }; in try_from_fmt()
|
| /linux/rust/pin-init/examples/ |
| H A D | linked_list.rs | 63 if ptr::eq(self.next.as_ptr(), self) { in next() 66 Some(unsafe { NonNull::new_unchecked(self.next.as_ptr() as *mut Self) }) in next() 86 if !ptr::eq(self.next.as_ptr(), &*self) { in drop() 87 let next = unsafe { &*self.next.as_ptr() }; in drop() 88 let prev = unsafe { &*self.prev.as_ptr() }; in drop() 113 unsafe { &(*self.0.get().as_ptr()).next } in next() 119 unsafe { &(*self.0.get().as_ptr()).prev } in prev() 124 unsafe { &*self.0.get().as_ptr() } in cur() 133 fn as_ptr(&self) -> *const ListHead { in as_ptr() method 134 self.0.get().as_ptr() in as_ptr() [all...] |
| /linux/rust/kernel/mm/ |
| H A D | virt.rs | 56 pub fn as_ptr(&self) -> *mut bindings::vm_area_struct { in as_ptr() method 66 unsafe { MmWithUser::from_raw((*self.as_ptr()).vm_mm) } in mm() 76 unsafe { (*self.as_ptr()).__bindgen_anon_2.vm_flags } in flags() 84 unsafe { (*self.as_ptr()).__bindgen_anon_1.__bindgen_anon_1.vm_start } in start() 92 unsafe { (*self.as_ptr()).__bindgen_anon_1.__bindgen_anon_1.vm_end } in end() 126 unsafe { bindings::zap_vma_range(self.as_ptr(), address, size) }; in zap_page_range_single() 140 Some(unsafe { VmaMixedMap::from_raw(self.as_ptr()) }) in as_mixedmap_vma() 195 to_result(unsafe { bindings::vm_insert_page(self.as_ptr(), address, page.as_ptr()) }) in vm_insert_page() 251 unsafe { (*self.as_ptr()) in update_flags() [all...] |
| /linux/rust/kernel/sync/ |
| H A D | refcount.rs | 35 fn as_ptr(&self) -> *mut bindings::refcount_t { in as_ptr() method 57 unsafe { bindings::refcount_set(self.as_ptr(), value) } in set() 70 unsafe { bindings::refcount_inc(self.as_ptr()) } in inc() 82 unsafe { bindings::refcount_dec(self.as_ptr()) } in dec() 106 unsafe { bindings::refcount_dec_and_test(self.as_ptr()) } in dec_and_test()
|
| H A D | atomic.rs | 40 /// [`Atomic::as_ptr()`], this provides a way to interact with [C-side atomic operations] 235 pub const fn as_ptr(&self) -> *mut T { 236 // GUARANTEE: Per the function guarantee of `AtomicRepr::as_ptr()`, the `self.0.as_ptr()` 239 self.0.as_ptr().cast() in get_mut() 262 unsafe { &mut *self.0.as_ptr().cast() } 228 pub const fn as_ptr(&self) -> *mut T { as_ptr() method
|
| /linux/rust/kernel/debugfs/ |
| H A D | entry.rs | 39 Some(entry) => entry.as_ptr(), in dynamic_dir() 66 // * `parent.as_ptr()` is a pointer to a valid `dentry` by invariant. in dynamic_file() 74 parent.as_ptr(), in dynamic_file() 92 Some(entry) => entry.as_ptr(), in dir() 117 // * `parent.as_ptr()` is a pointer to a valid `dentry` because we have `&'a Entry`. in file() 127 parent.as_ptr(), in file() 159 pub(crate) fn as_ptr(&self) -> *mut bindings::dentry { in drop() 167 // `as_ptr` guarantees that the pointer is of this form. 168 unsafe { bindings::debugfs_remove(self.as_ptr()) } 153 pub(crate) fn as_ptr(&self) -> *mut bindings::dentry { as_ptr() method
|
| /linux/rust/kernel/fs/ |
| H A D | file.rs | 204 unsafe { bindings::get_file(self.as_ptr()) }; in inc_ref() 211 unsafe { bindings::fput(obj.cast().as_ptr()) } in dec_ref() 240 unsafe { bindings::get_file(self.as_ptr()) }; in inc_ref() 248 unsafe { bindings::fput(obj.cast().as_ptr()) } in dec_ref() 317 pub fn as_ptr(&self) -> *mut bindings::file { in as_ptr() method 325 let ptr = unsafe { (*self.as_ptr()).f_cred }; in cred() 343 unsafe { core::ptr::addr_of!((*self.as_ptr()).f_flags).read_volatile() } in flags() 437 unsafe { bindings::fd_install(self.fd, file.as_ptr()) }; in fd_install()
|
| /linux/rust/kernel/sync/atomic/ |
| H A D | internal.rs | 92 pub const fn as_ptr(&self) -> *mut T { 283 // SAFETY: `a.as_ptr()` is valid and properly aligned. 284 unsafe { bindings::#call(a.as_ptr().cast()) } 289 // SAFETY: `a.as_ptr()` is valid and properly aligned. 290 unsafe { bindings::#call(a.as_ptr().cast(), v) } 303 // SAFETY: `a.as_ptr()` is valid and properly aligned. 304 unsafe { bindings::#call(a.as_ptr().cast(), v) } 316 // SAFETY: `a.as_ptr()` is valid and properly aligned. `core::ptr::from_mut(old)` 318 unsafe { bindings::#call(a.as_ptr().cast(), core::ptr::from_mut(old), new) } 331 // SAFETY: `a.as_ptr()` i 60 pub const fn as_ptr(&self) -> *mut T { as_ptr() method [all...] |
| /linux/rust/kernel/alloc/ |
| H A D | kvec.rs | 258 self.ptr.as_ptr() in as_mut_ptr() 264 pub const fn as_ptr(&self) -> *const T { in as_ptr() function 265 self.ptr.as_ptr() in as_ptr() 781 if !unsafe { bindings::is_vmalloc_addr(self.ptr.as_ptr().cast()) } { in shrink_to() 835 ptr::copy_nonoverlapping(self.as_ptr(), new_ptr.as_ptr().cast::<T>(), self.len()) in shrink_to() 1004 unsafe { slice::from_raw_parts(self.as_ptr(), self.len) } in deref() 1255 let has_advanced = ptr != buf.as_ptr(); in collect() 1266 unsafe { ptr::copy(ptr, buf.as_ptr(), len) }; in collect() 1267 ptr = buf.as_ptr(); in collect() 1290 ptr.as_ptr().cast() in collect()
|
| H A D | allocator.rs | 98 ptr.as_ptr() in call() 193 let page = unsafe { bindings::vmalloc_to_page(ptr.as_ptr().cast()) }; in to_page() 283 let addr = self.0.as_ptr() as usize; in test_alignment()
|
| /linux/rust/kernel/irq/ |
| H A D | request.rs | 211 cookie: this.as_ptr().cast::<c_void>(), in new() 227 this.as_ptr().cast::<c_void>(), in new() 428 cookie: this.as_ptr().cast::<c_void>(), in new() 445 this.as_ptr().cast::<c_void>(), in new()
|
| /linux/rust/kernel/drm/ |
| H A D | device.rs | 109 ioctls: T::IOCTLS.as_ptr(), 148 let raw_data = unsafe { ptr::addr_of_mut!((*raw_drm.as_ptr()).data) }; in new() 185 unsafe { &raw mut (*ptr.as_ptr()).dev }.cast() in into_drm_device()
|