/linux/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() 183 pub fn pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Self, E> in pin_init() 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() 237 pub fn pair_from_unique<const ID2: u64>(unique: UniqueArc<T>) -> (Self, ListArc<T, ID2>) in pair_from_unique() 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() [all …]
|
/linux/rust/kernel/ |
H A D | cpumask.rs | 58 pub unsafe fn as_mut_ref<'a>(ptr: *mut bindings::cpumask) -> &'a mut Self { in as_mut_ref() argument 72 pub unsafe fn as_ref<'a>(ptr: *const bindings::cpumask) -> &'a Self { in as_ref() argument 82 let this: *const Self = self; in as_raw() constant 158 pub fn copy(&self, dstp: &mut Self) { in copy() argument 224 new_zero(_flags: Flags) -> Result<Self, AllocError> new_zero() argument 249 new(_flags: Flags) -> Result<Self, AllocError> new() argument 273 as_mut_ref<'a>(ptr: *mut bindings::cpumask_var_t) -> &'a mut Self as_mut_ref() argument 287 as_ref<'a>(ptr: *const bindings::cpumask_var_t) -> &'a Self as_ref() argument 296 try_clone(cpumask: &Cpumask) -> Result<Self> try_clone() argument [all...] |
H A D | cpu.rs | 56 pub unsafe fn from_i32_unchecked(id: i32) -> Self { in from_i32_unchecked() argument 65 pub fn from_i32(id: i32) -> Option<Self> { in from_i32() argument 80 pub unsafe fn from_u32_unchecked(id: u32) -> Self { in from_u32_unchecked() argument 91 pub fn from_u32(id: u32) -> Option<Self> { in from_u32() argument 119 from(id: CpuId) -> Self from() argument 125 from(id: CpuId) -> Self from() argument [all...] |
H A D | types.rs | 63 unsafe fn from_foreign(ptr: *mut c_void) -> Self; in from_foreign() 75 unsafe fn try_from_foreign(ptr: *mut c_void) -> Option<Self> { in try_from_foreign() 140 unsafe fn from_foreign(_: *mut c_void) -> Self {} in from_foreign() 224 pub fn new_with_data(data: T, cleanup_func: F) -> Self { in new_with_data() 334 pub const fn new(value: T) -> Self { in new() 365 pub fn ffi_init(init_func: impl FnOnce(*mut T)) -> impl PinInit<Self> { in ffi_init() 386 ) -> impl PinInit<Self, E> { in try_ffi_init() 408 pub const fn cast_from(this: *const T) -> *const Self { in cast_from() 415 fn pin_init<E>(slot: impl PinInit<T, E>) -> impl PinInit<Self, E> { in pin_init() argument
|
H A D | firmware.rs | 62 fn request_internal(name: &CStr, dev: &Device, func: FwFunc) -> Result<Self> { in request_internal() argument 80 pub fn request(name: &CStr, dev: &Device) -> Result<Self> { in request() argument 86 pub fn request_nowarn(name: &CStr, dev: &Device) -> Result<Self> { in request_nowarn() argument 234 new(module_name: &'static CStr) -> Self new() argument 242 push_internal(mut self, bytes: &[u8]) -> Self push_internal() argument 280 push(self, s: &str) -> Self push() argument 289 push_module_name(self) -> Self push_module_name() argument 313 new_entry(self) -> Self new_entry() argument [all...] |
H A D | cpufreq.rs | 91 fn new(val: u32) -> Result<Self> { in new() 105 fn from(rel: Relation) -> Self { in from() 141 pub unsafe fn from_raw_mut<'a>(ptr: *mut bindings::cpufreq_policy_data) -> &'a mut Self { in from_raw_mut() 152 let this: *const Self = self; in as_raw() constant 181 pub unsafe fn new(index: usize) -> Self { in new() 189 fn from(index: TableIndex) -> Self { in from() 235 pub unsafe fn from_raw<'a>(ptr: *const bindings::cpufreq_frequency_table) -> &'a Self { in from_raw() 246 let this: *const Self = self; in as_raw() constant 289 fn new(entries: KVec<bindings::cpufreq_frequency_table>) -> Result<Self> { in new() 425 pub unsafe fn from_raw<'a>(ptr: *const bindings::cpufreq_policy) -> &'a Self { in from_raw() [all …]
|
H A D | opp.rs | 39 new(table: &Table) -> Result<Self> new() argument 122 from(volt: MicroVolt) -> Self from() argument 147 from(power: MicroWatt) -> Self from() argument 181 new(dev: &ARef<Device>, mut data: Data) -> Result<Self> new() argument 230 new(freq: Hertz, volt: MicroVolt, level: u32, turbo: bool) -> Self new() argument 379 set_clk_names(mut self, names: KVec<CString>) -> Result<Self> set_clk_names() argument 393 set_prop_name(mut self, name: CString) -> Result<Self> set_prop_name() argument 403 set_regulator_names(mut self, names: KVec<CString>) -> Result<Self> set_regulator_names() argument 418 set_required_dev(mut self, dev: ARef<Device>, index: u32) -> Result<Self> set_required_dev() argument 428 set_supported_hw(mut self, hw: KVec<u32>) -> Result<Self> set_supported_hw() argument 623 from_raw_table(ptr: *mut bindings::opp_table, dev: &ARef<Device>) -> Self from_raw_table() argument 639 from_dev(dev: &Device) -> Result<Self> from_dev() argument 659 from_of(dev: &ARef<Device>, index: i32) -> Result<Self> from_of() argument 687 from_of_cpumask(dev: &Device, cpumask: &mut Cpumask) -> Result<Self> from_of_cpumask() argument 1051 dec_ref(obj: ptr::NonNull<Self>) dec_ref() argument 1069 from_raw_opp_owned(ptr: *mut bindings::dev_pm_opp) -> Result<ARef<Self>> from_raw_opp_owned() argument 1087 from_raw_opp<'a>(ptr: *mut bindings::dev_pm_opp) -> Result<&'a Self> from_raw_opp() argument [all...] |
H A D | clk.rs | 38 pub const fn from_khz(khz: c_ulong) -> Self { in from_khz() 43 pub const fn from_mhz(mhz: c_ulong) -> Self { in from_mhz() 48 pub const fn from_ghz(ghz: c_ulong) -> Self { in from_ghz() 74 fn from(freq: Hertz) -> Self { in from() 138 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get() 306 pub fn get(dev: &Device, name: Option<&CStr>) -> Result<Self> { in get()
|
H A D | pci.rs | 132 from_id(vendor: u32, device: u32) -> Self from_id() argument 148 from_class(class: u32, class_mask: u32) -> Self from_class() argument 245 probe(dev: &Device<device::Core>, id_info: &Self::IdInfo) -> Result<Pin<KBox<Self>>> probe() argument 257 unbind(dev: &Device<device::Core>, this: Pin<&Self>) unbind() argument 291 new(pdev: &Device, num: u32, name: &CStr) -> Result<Self> new() argument 464 dec_ref(obj: NonNull<Self>) dec_ref() argument 484 try_from(dev: &device::Device<Ctx>) -> Result<Self, Self::Error> try_from() argument [all...] |
H A D | auxiliary.rs | 107 pub const fn new(modname: &'static CStr, name: &'static CStr) -> Self { in new() argument 187 fn probe(dev: &Device<device::Core>, id_info: &Self::IdInfo) -> Result<Pin<KBox<Self>>>; in probe() argument 220 let ptr: *const Self in parent() constant 254 dec_ref(obj: NonNull<Self>) dec_ref() argument 298 new(parent: &device::Device, name: &CStr, id: u32, modname: &CStr) -> Result<Self> new() argument [all...] |
/linux/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/rust/kernel/sync/ |
H A D | arc.rs | 219 fn try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in try_init() argument 229 pub fn new(contents: T, flags: Flags) -> Result<Self, AllocErro argument 252 from_inner(inner: NonNull<ArcInner<T>>) -> Self from_inner() argument 285 from_raw(ptr: *const T) -> Self from_raw() argument 308 ptr_eq(this: &Self, other: &Self) -> bool ptr_eq() argument 382 from_foreign(ptr: *mut c_void) -> Self from_foreign() argument 452 clone(&self) -> Self clone() argument 479 from(item: UniqueArc<T>) -> Self from() argument 485 from(item: Pin<UniqueArc<T>>) -> Self from() argument 562 clone(&self) -> Self clone() argument 577 new(inner: NonNull<ArcInner<T>>) -> Self new() argument 595 from_raw(ptr: *const T) -> Self from_raw() argument 608 from(b: ArcBorrow<'_, T>) -> Self from() argument 718 try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> where E: From<AllocError>, try_init() argument 750 new(value: T, flags: Flags) -> Result<Self, AllocError> new() argument 824 from(obj: UniqueArc<T>) -> Self from() argument [all...] |
H A D | aref.rs | 40 dec_ref(obj: NonNull<Self>) dec_ref() argument 82 from_raw(ptr: NonNull<T>) -> Self from_raw() argument 124 clone(&self) -> Self clone() argument 141 from(b: &T) -> Self from() argument [all...] |
H A D | poll.rs | 42 pub unsafe fn from_raw(table: *mut bindings::poll_table) -> Self { in from_raw() 76 pub fn new(name: &'static CStr, key: Pin<&'static LockClassKey>) -> impl PinInit<Self> { in new() 95 fn drop(self: Pin<&mut Self>) { in drop()
|
/linux/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() argument 85 pub(crate) unsafe fn start_unchecked(this: &ARef<Self>) { in start_unchecked() argument 100 fn try_set_end(this: ARef<Self>) -> Result<*mut bindings::request, ARef<Self>> { in try_set_end() argument 124 pub fn end_ok(this: ARef<Self>) -> Result<(), ARef<Self>> { in end_ok() argument 220 dec_ref(obj: core::ptr::NonNull<Self>) dec_ref() argument [all...] |
H A D | gen_disk.rs | 85 pub fn physical_block_size(mut self, block_size: u32) -> Result<Self> { in capacity_sectors() argument 41 rotational(mut self, rotational: bool) -> Self rotational() argument 63 logical_block_size(mut self, block_size: u32) -> Result<Self> logical_block_size() argument 78 physical_block_size(mut self, block_size: u32) -> Result<Self> physical_block_size() argument [all...] |
/linux/rust/pin-init/examples/ |
H A D | linked_list.rs | 44 pub fn insert_next(list: &ListHead) -> impl PinInit<Self, Infallible> + '_ { in insert_next() 53 pub fn insert_prev(list: &ListHead) -> impl PinInit<Self, Infallible> + '_ { in insert_prev() 62 pub fn next(&self) -> Option<NonNull<Self>> { in next() 85 fn drop(self: Pin<&mut Self>) { in drop() 107 unsafe fn new_unchecked(ptr: NonNull<ListHead>) -> Self { in new_unchecked()
|
H A D | pthread_mutex.rs | 36 fn drop(self: Pin<&mut Self>) { in drop() 52 fn from(e: Infallible) -> Self { in from() 59 fn from(_: AllocError) -> Self { in from() 66 pub fn new(data: T) -> impl PinInit<Self, Error> { in new()
|
/linux/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/rust/kernel/io/ |
H A D | mem.rs | 31 pub(crate) unsafe fn new(device: &'a Device<Bound>, resource: &'a Resource) -> Self { in new() 164 fn ioremap(resource: &Resource) -> Result<Self> { in ioremap() 189 pub fn new<'a>(io_request: IoRequest<'a>) -> impl PinInit<Devres<Self>, Error> + 'a { in new() 219 fn ioremap(resource: &Resource) -> Result<Self> { in ioremap() 257 pub fn new<'a>(io_request: IoRequest<'a>) -> impl PinInit<Devres<Self>, Error> + 'a { in new()
|
/linux/rust/kernel/drm/gem/ |
H A D | mod.rs | 20 new(dev: &drm::Device<T::Driver>, size: usize) -> impl PinInit<Self, Error> new() argument 54 from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self from_raw() argument 64 dec_ref(obj: NonNull<Self>) dec_ref() argument 127 from_raw<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self from_raw() argument 160 lookup_handle( file: &drm::File<<<Self as IntoGEMObject>::Driver as drm::Driver>::File>, handle: u32, ) -> Result<ARef<Self>> lookup_handle() argument 232 new(dev: &drm::Device<T::Driver>, size: usize) -> Result<ARef<Self>> new() argument [all...] |
/linux/rust/kernel/drm/ |
H A D | device.rs | 97 new(dev: &device::Device, data: impl PinInit<T::Data, Error>) -> Result<ARef<Self>> new() argument 144 from_drm_device(ptr: *const bindings::drm_device) -> *mut Self from_drm_device() argument 170 from_raw<'a>(ptr: *const bindings::drm_device) -> &'a Self from_raw() argument 206 dec_ref(obj: NonNull<Self>) dec_ref() argument [all...] |
/linux/rust/kernel/alloc/ |
H A D | kbox.rs | 179 pub const unsafe fn from_raw(raw: *mut T) -> Self { in from_raw() 256 pub fn new(x: T, flags: Flags) -> Result<Self, AllocError> { in new() 373 pub fn into_pin(this: Self) -> Pin<Self> { in into_pin() 426 fn from(b: Box<T, A>) -> Self { in from() 465 fn try_pin_init<E>(init: impl PinInit<T, E>, flags: Flags) -> Result<Pin<Self>, E> in try_pin_init() 473 fn try_init<E>(init: impl Init<T, E>, flags: Flags) -> Result<Self, E> in try_init() 500 unsafe fn from_foreign(ptr: *mut c_void) -> Self { in from_foreign() 535 unsafe fn from_foreign(ptr: *mut c_void) -> Self { in from_foreign()
|
/linux/rust/kernel/device/ |
H A D | property.rs | 45 from_raw(raw: *mut bindings::fwnode_handle) -> ARef<Self> from_raw() argument 202 get_child_by_name(&self, name: &CStr) -> Option<ARef<Self>> get_child_by_name() argument 368 dec_ref(obj: ptr::NonNull<Self>) dec_ref() argument 438 read_from_fwnode_property(fwnode: &FwNode, name: &CStr) -> Result<Self> read_from_fwnode_property() argument 444 read_from_fwnode_property(fwnode: &FwNode, name: &CStr) -> Result<Self> read_from_fwnode_property() argument 479 read_array_from_fwnode_property<'a>( fwnode: &FwNode, name: &CStr, out: &'a mut [MaybeUninit<Self>], ) -> Result<&'a mut [Self]> read_array_from_fwnode_property() argument 480 read_array_from_fwnode_property<'a>( fwnode: &FwNode, name: &CStr, out: &'a mut [MaybeUninit<Self>], ) -> Result<&'a mut [Self]> read_array_from_fwnode_property() argument [all...] |
/linux/samples/rust/ |
H A D | rust_driver_auxiliary.rs | 30 fn probe(adev: &auxiliary::Device<Core>, _info: &Self::IdInfo) -> Result<Pin<KBox<Self>>> { in probe() argument 64 probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> Result<Pin<KBox<Self>>> probe() argument 105 init(module: &'static kernel::ThisModule) -> impl PinInit<Self, Error> init() argument [all...] |