Home
last modified time | relevance | path

Searched refs:UnsafeCell (Results 1 – 13 of 13) sorted by relevance

/linux/rust/kernel/
H A Dtypes.rs7 cell::UnsafeCell,
324 value: UnsafeCell<MaybeUninit<T>>,
335 value: UnsafeCell::new(MaybeUninit::new(value)), in new()
343 value: UnsafeCell::new(MaybeUninit::uninit()), in uninit()
351 value: UnsafeCell::new(MaybeUninit::zeroed()), in zeroed()
395 UnsafeCell::get(&self.value).cast::<T>() in get()
403 UnsafeCell::raw_get(this.cast::<UnsafeCell<MaybeUninit<T>>>()).cast::<T>() in cast_into()
H A Dconfigfs.rs121 use core::cell::UnsafeCell;
684 UnsafeCell<[*mut kernel::ffi::c_void; N]>,
701 Self(UnsafeCell::new([core::ptr::null_mut(); N]), PhantomData) in new()
H A Dcpufreq.rs28 cell::UnsafeCell,
903 pub struct Registration<T: Driver>(KBox<UnsafeCell<bindings::cpufreq_driver>>, PhantomData<T>);
1037 let mut drv = KBox::new(UnsafeCell::new(Self::VTABLE), GFP_KERNEL)?; in new()
/linux/rust/pin-init/examples/
H A Dpthread_mutex.rs13 cell::UnsafeCell,
25 raw: UnsafeCell<libc::pthread_mutex_t>,
26 data: UnsafeCell<T>,
67 fn init_raw() -> impl PinInit<UnsafeCell<libc::pthread_mutex_t>, Error> { in new()
68 let init = |slot: *mut UnsafeCell<libc::pthread_mutex_t>| { in new()
102 data: UnsafeCell::new(data), in new()
H A Dstatic_init.rs9 cell::{Cell, UnsafeCell},
27 cell: UnsafeCell<MaybeUninit<T>>,
39 cell: UnsafeCell::new(MaybeUninit::uninit()), in new()
H A Dmutex.rs9 cell::{Cell, UnsafeCell},
73 data: UnsafeCell<T>,
84 pin_init_from_closure(|slot: *mut UnsafeCell<T>| { in new()
/linux/rust/kernel/sync/
H A Dset_once.rs9 use core::{cell::UnsafeCell, mem::MaybeUninit};
45 value: UnsafeCell<MaybeUninit<T>>,
61 value: UnsafeCell::new(MaybeUninit::uninit()), in new()
H A Dlocked_by.rs7 use core::{cell::UnsafeCell, mem::size_of, ptr};
80 data: UnsafeCell<T>,
109 data: UnsafeCell::new(data), in new()
H A Dlock.rs13 use core::{cell::UnsafeCell, marker::PhantomPinned, pin::Pin};
119 pub(crate) data: UnsafeCell<T>,
137 data <- UnsafeCell::pin_init(t), in new()
/linux/rust/kernel/sync/lock/
H A Dglobal.rs14 cell::UnsafeCell,
51 data: UnsafeCell::new(data), in new()
123 value: UnsafeCell<T>,
150 value: UnsafeCell::new(val), in new()
/linux/rust/kernel/sync/atomic/
H A Dinternal.rs9 use core::cell::UnsafeCell;
47 pub struct AtomicRepr<T: AtomicImpl>(UnsafeCell<T>);
52 Self(UnsafeCell::new(v)) in new()
/linux/rust/pin-init/src/
H A Dlib.rs284 cell::UnsafeCell,
1717 {<T: ?Sized + Zeroable>} UnsafeCell<T>,
1800 impl<T> Wrapper<T> for UnsafeCell<T> { implementation
/linux/rust/pin-init/
H A DREADME.md165 cell::UnsafeCell,
190 foo: UnsafeCell<MaybeUninit<bindings::foo>>,
203 let foo = UnsafeCell::raw_get(foo).cast::<bindings::foo>();