| /linux-6.15/rust/kernel/list/ |
| H A D | arc.rs | 42 unsafe fn on_create_list_arc_from_unique(self: Pin<&mut Self>); in on_create_list_arc_from_unique() 173 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocError> { in new() 194 pub fn init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in init() 208 fn from(unique: UniqueArc<T>) -> Self { in from() 219 fn from(mut unique: Pin<UniqueArc<T>>) -> Self { in from() 250 ) -> (Self, ListArc<T, ID2>) in pair_from_pin_unique() 277 pub fn try_from_arc(arc: Arc<T>) -> Result<Self, Arc<T>> in try_from_arc() 327 unsafe fn transmute_from_arc(arc: Arc<T>) -> Self { in transmute_from_arc() 361 pub unsafe fn from_raw(ptr: *const T) -> Self { in from_raw() 406 pub fn ptr_eq(this: &Self, other: &Self) -> bool { in ptr_eq() [all …]
|
| /linux-6.15/rust/pin-init/src/ |
| H A D | alloc.rs | 30 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init() 38 fn pin_init(init: impl PinInit<T>) -> Result<Pin<Self>, AllocError> { in pin_init() 50 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init() 55 fn init(init: impl Init<T>) -> Result<Self, AllocError> { in init() method 82 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init() 90 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init() 100 fn try_pin_init<E>(init: impl PinInit<T, E>) -> Result<Pin<Self>, E> in try_pin_init() 118 fn try_init<E>(init: impl Init<T, E>) -> Result<Self, E> in try_init()
|
| /linux-6.15/rust/kernel/ |
| H A D | types.rs | 49 unsafe fn from_foreign(ptr: *mut crate::ffi::c_void) -> Self; in from_foreign() 61 unsafe fn try_from_foreign(ptr: *mut crate::ffi::c_void) -> Option<Self> { in try_from_foreign() 123 unsafe fn from_foreign(_: *mut crate::ffi::c_void) -> Self {} in from_foreign() 207 pub fn new_with_data(data: T, cleanup_func: F) -> Self { in new_with_data() 317 pub const fn new(value: T) -> Self { in new() 333 pub fn pin_init(slot: impl PinInit<T>) -> impl PinInit<Self> { in pin_init() 372 ) -> impl PinInit<Self, E> { in try_ffi_init() 427 unsafe fn dec_ref(obj: NonNull<Self>); in dec_ref() 469 pub unsafe fn from_raw(ptr: NonNull<T>) -> Self { in from_raw() 511 fn clone(&self) -> Self { in clone() [all …]
|
| H A D | firmware.rs | 62 fn request_internal(name: &CStr, dev: &Device, func: FwFunc) -> Result<Self> { in request_internal() 79 pub fn request(name: &CStr, dev: &Device) -> Result<Self> { in request() 85 pub fn request_nowarn(name: &CStr, dev: &Device) -> Result<Self> { in request_nowarn() 233 pub const fn new(module_name: &'static CStr) -> Self { in new() 241 const fn push_internal(mut self, bytes: &[u8]) -> Self { in push_internal() 279 pub const fn push(self, s: &str) -> Self { in push() 288 const fn push_module_name(self) -> Self { in push_module_name() 312 pub const fn new_entry(self) -> Self { in new_entry()
|
| H A D | pci.rs | 132 pub const fn from_id(vendor: u32, device: u32) -> Self { in from_id() 148 pub const fn from_class(class: u32, class_mask: u32) -> Self { in from_class() 240 fn probe(dev: &Device<device::Core>, id_info: &Self::IdInfo) -> Result<Pin<KBox<Self>>>; in probe() 271 fn new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> { in new() 429 let ptr: *const Self = self; in deref() constant 440 fn from(dev: &Device<device::Core>) -> Self { in from() 452 unsafe fn dec_ref(obj: NonNull<Self>) { in dec_ref()
|
| H A D | platform.rs | 168 -> Result<Pin<KBox<Self>>>; in probe() 197 let ptr: *const Self = self; in deref() constant 208 fn from(dev: &Device<device::Core>) -> Self { in from() 220 unsafe fn dec_ref(obj: NonNull<Self>) { in dec_ref()
|
| H A D | revocable.rs | 83 pub fn new(data: impl PinInit<T>) -> impl PinInit<Self> { in new() 173 fn drop(self: Pin<&mut Self>) { in drop() 202 fn new(data_ref: *const T, rcu_guard: rcu::Guard) -> Self { in new()
|
| H A D | devres.rs | 132 fn as_ptr(&self) -> *const Self { in as_ptr() 136 fn remove_action(this: &Arc<Self>) { in remove_action() 174 pub fn new(dev: &Device, data: T, flags: Flags) -> Result<Self> { in new()
|
| H A D | str.rs | 30 pub const fn from_bytes(bytes: &[u8]) -> &Self { in from_bytes() 235 pub unsafe fn from_char_ptr<'a>(ptr: *const crate::ffi::c_char) -> &'a Self { in from_char_ptr() 250 pub const fn from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, CStrConvertError> { in from_bytes_with_nul() 583 fn from_fmt(args: fmt::Arguments<'_>) -> Self { in from_fmt() 738 pub(crate) unsafe fn from_ptrs(pos: *mut u8, end: *mut u8) -> Self { in from_ptrs() 753 pub(crate) unsafe fn from_buffer(buf: *mut u8, len: usize) -> Self { in from_buffer() 815 pub(crate) unsafe fn from_buffer(buf: *mut u8, len: usize) -> Self { in from_buffer() 873 pub fn try_from_fmt(args: fmt::Arguments<'_>) -> Result<Self, Error> { in try_from_fmt()
|
| H A D | device.rs | 58 pub unsafe fn get_device(ptr: *mut bindings::device) -> ARef<Self> { in get_device() 76 pub unsafe fn as_ref<'a>(ptr: *mut bindings::device) -> &'a Self { in as_ref() 199 unsafe fn dec_ref(obj: ptr::NonNull<Self>) { in dec_ref()
|
| /linux-6.15/rust/kernel/block/mq/ |
| H A D | request.rs | 68 pub(crate) unsafe fn aref_from_raw(ptr: *mut bindings::request) -> ARef<Self> { in aref_from_raw() 72 unsafe { ARef::from_raw(NonNull::new_unchecked(ptr as *const Self as *mut Self)) } in aref_from_raw() constant 85 pub(crate) unsafe fn start_unchecked(this: &ARef<Self>) { in start_unchecked() 100 fn try_set_end(this: ARef<Self>) -> Result<*mut bindings::request, ARef<Self>> { in try_set_end() 121 pub fn end_ok(this: ARef<Self>) -> Result<(), ARef<Self>> { in end_ok() 158 unsafe { Self::wrapper_ptr(self as *const Self as *mut Self).as_ref() } in wrapper_ref() constant 246 unsafe fn dec_ref(obj: core::ptr::NonNull<Self>) { in dec_ref()
|
| H A D | gen_disk.rs | 41 pub fn rotational(mut self, rotational: bool) -> Self { in rotational() method 63 pub fn logical_block_size(mut self, block_size: u32) -> Result<Self> { in logical_block_size() 78 pub fn physical_block_size(mut self, block_size: u32) -> Result<Self> { in physical_block_size() 85 pub fn capacity_sectors(mut self, capacity: u64) -> Self { in capacity_sectors()
|
| H A D | tag_set.rs | 40 ) -> impl PinInit<Self, error::Error> { in new() 80 fn drop(self: Pin<&mut Self>) { in drop()
|
| /linux-6.15/rust/kernel/sync/ |
| H A D | arc.rs | 251 unsafe fn from_inner(inner: NonNull<ArcInner<T>>) -> Self { in from_inner() 284 pub unsafe fn from_raw(ptr: *const T) -> Self { in from_raw() 307 pub fn ptr_eq(this: &Self, other: &Self) -> bool { in ptr_eq() 427 fn clone(&self) -> Self { in clone() 464 fn from(item: UniqueArc<T>) -> Self { in from() 470 fn from(item: Pin<UniqueArc<T>>) -> Self { in from() 547 fn clone(&self) -> Self { in clone() 562 unsafe fn new(inner: NonNull<ArcInner<T>>) -> Self { in new() 580 pub unsafe fn from_raw(ptr: *const T) -> Self { in from_raw() 593 fn from(b: ArcBorrow<'_, T>) -> Self { in from() [all …]
|
| H A D | poll.rs | 92 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new() 110 fn drop(self: Pin<&mut Self>) { in drop()
|
| /linux-6.15/rust/pin-init/examples/ |
| H A D | linked_list.rs | 41 pub fn insert_next(list: &ListHead) -> impl PinInit<Self, Infallible> + '_ { in insert_next() 50 pub fn insert_prev(list: &ListHead) -> impl PinInit<Self, Infallible> + '_ { in insert_prev() 59 pub fn next(&self) -> Option<NonNull<Self>> { in next() 82 fn drop(self: Pin<&mut Self>) { in drop() 104 unsafe fn new_unchecked(ptr: NonNull<ListHead>) -> Self { in new_unchecked()
|
| H A D | pthread_mutex.rs | 34 fn drop(self: Pin<&mut Self>) { in drop() 49 fn from(e: Infallible) -> Self { in from() 56 fn from(_: AllocError) -> Self { in from() 62 pub fn new(data: T) -> impl PinInit<Self, Error> { in new()
|
| H A D | error.rs | 14 fn from(e: Infallible) -> Self { in from() 21 fn from(_: AllocError) -> Self { in from()
|
| /linux-6.15/scripts/ |
| H A D | generate_rust_target.rs | 69 fn from(value: bool) -> Self { in from() 75 fn from(value: i32) -> Self { in from() 81 fn from(value: String) -> Self { in from() 87 fn from(value: &str) -> Self { in from() 93 fn from(object: Object) -> Self { in from() 99 fn from(i: [T; N]) -> Self { in from()
|
| /linux-6.15/rust/kernel/alloc/ |
| H A D | layout.rs | 23 fn clone(&self) -> Self { in clone() 65 pub const fn new(len: usize) -> Result<Self, LayoutError> { in new() 83 pub unsafe fn new_unchecked(len: usize) -> Self { in new_unchecked() 104 fn from(value: ArrayLayout<T>) -> Self { in from()
|
| H A D | kbox.rs | 138 pub const unsafe fn from_raw(raw: *mut T) -> Self { in from_raw() 215 pub fn new(x: T, flags: Flags) -> Result<Self, AllocError> { in new() 255 pub fn into_pin(this: Self) -> Pin<Self> { in into_pin() 308 fn from(b: Box<T, A>) -> Self { in from() 347 fn try_pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Pin<Self>, E> in try_pin_init() 355 fn try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in try_init() 374 unsafe fn from_foreign(ptr: *mut crate::ffi::c_void) -> Self { in from_foreign() 406 unsafe fn from_foreign(ptr: *mut crate::ffi::c_void) -> Self { in from_foreign()
|
| /linux-6.15/samples/rust/ |
| H A D | rust_misc_device.rs | 132 fn init(_module: &'static ThisModule) -> impl PinInit<Self, Error> { in init() 160 fn open(_file: &File, misc: &MiscDeviceRegistration<Self>) -> Result<Pin<KBox<Self>>> { in open() 197 fn drop(self: Pin<&mut Self>) { in drop()
|
| /linux-6.15/drivers/block/ |
| H A D | rnull.rs | 42 fn init(_module: &'static ThisModule) -> impl PinInit<Self, Error> { in init() 68 fn queue_rq(rq: ARef<mq::Request<Self>>, _is_last: bool) -> Result { in queue_rq()
|
| /linux-6.15/drivers/gpu/nova-core/ |
| H A D | firmware.rs | 11 const fn make_entry_file(self, chipset: &str, fw: &str) -> Self { in make_entry_file() 25 const fn make_entry_chipset(self, chipset: &str) -> Self { in make_entry_chipset()
|
| /linux-6.15/rust/kernel/net/ |
| H A D | phy.rs | 86 unsafe fn from_raw<'a>(ptr: *mut bindings::phy_device) -> &'a mut Self { in from_raw() 664 ) -> Result<Self> { in register() 700 pub const fn new_with_exact_mask(id: u32) -> Self { in new_with_exact_mask() 708 pub const fn new_with_model_mask(id: u32) -> Self { in new_with_model_mask() 716 pub const fn new_with_vendor_mask(id: u32) -> Self { in new_with_vendor_mask() 724 pub const fn new_with_custom_mask(id: u32, mask: u32) -> Self { in new_with_custom_mask() 732 pub const fn new_with_driver<T: Driver>() -> Self { in new_with_driver()
|