Home
last modified time | relevance | path

Searched defs:T (Results 1 – 25 of 42) sorted by relevance

12

/DragonOS/kernel/src/libs/
H A Drwlock.rs86 pub fn into_inner(self) -> T { in into_inner()
95 pub fn as_mut_ptr(&self) -> *mut T { in as_mut_ptr()
120 pub fn try_read(&self) -> Option<RwLockReadGuard<T>> { in try_read()
129 fn inner_try_read(&self) -> Option<RwLockReadGuard<T>> { in inner_try_read()
156 pub fn read(&self) -> RwLockReadGuard<T> { in read()
166 pub fn read_irqsave(&self) -> RwLockReadGuard<T> { in read_irqsave()
180 pub fn try_read_irqsave(&self) -> Option<RwLockReadGuard<T>> { in try_read_irqsave()
209 pub fn try_write(&self) -> Option<RwLockWriteGuard<T>> { in try_write()
222 pub fn try_write_irqsave(&self) -> Option<RwLockWriteGuard<T>> { in try_write_irqsave()
238 fn inner_try_write(&self) -> Option<RwLockWriteGuard<T>> { in inner_try_write()
[all …]
H A Dlazy_init.rs68 pub fn init(&self, value: T) { in init()
86 pub fn get(&self) -> &T { in get()
93 pub fn try_get(&self) -> Option<&T> { in try_get()
104 pub fn get_mut(&mut self) -> &mut T { in get_mut()
110 pub unsafe fn get_unchecked(&self) -> &T { in get_unchecked()
115 pub unsafe fn get_mut_unchecked(&mut self) -> &mut T { in get_mut_unchecked()
124 fn deref(&self) -> &T { in deref()
131 fn deref_mut(&mut self) -> &mut T { in deref_mut()
H A Dvolatile.rs101 unsafe fn vread(self) -> T; in vread()
105 unsafe fn vread(self) -> T { in vread()
111 unsafe fn vread(self) -> T { in vread()
119 unsafe fn vwrite(self, value: T); in vwrite()
123 unsafe fn vwrite(self, value: T) { in vwrite()
129 unsafe fn vwrite(self, value: T) { in vwrite()
H A Dspinlock.rs44 pub unsafe fn leak(this: Self) -> &'a mut T { in leak()
71 pub fn lock(&self) -> SpinLockGuard<T> { in lock()
83 pub fn lock_no_preempt(&self) -> SpinLockGuard<T> { in lock_no_preempt()
92 pub fn lock_irqsave(&self) -> SpinLockGuard<T> { in lock_irqsave()
101 pub fn try_lock(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock()
128 pub fn try_lock_irqsave(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock_irqsave()
144 pub fn try_lock_no_preempt(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock_no_preempt()
H A Dlock_free_flags.rs23 pub fn get_mut(&self) -> &mut T { in get_mut()
25 (self.inner.get().as_ref().unwrap() as *const T as *mut T) in get_mut() constant
31 pub fn get(&self) -> &T { in get()
H A Dcasting.rs64 fn downcast_arc<T: Any + Send + Sync>(self: Arc<Self>) -> Option<Arc<T>> { in downcast_arc()
69 let new = unsafe { Arc::from_raw(p as *const T) }; in downcast_arc() constant
H A Dnotifier.rs31 block: Arc<dyn NotifierBlock<V, T>>, in register() argument
87 data: Option<&T>, in call_chain()
126 block: Arc<dyn NotifierBlock<V, T>>, in register_unique_prio() argument
140 data: Option<&T>, in call_chain()
165 block: Arc<dyn NotifierBlock<V, T>>, in register_unique_prio() argument
179 data: Option<&T>, in call_chain()
206 data: Option<&T>, in call_chain()
H A Dwait_queue.rs148 pub fn sleep_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_unlock_spinlock()
164 pub fn sleep_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_unlock_mutex()
180 pub fn sleep_uninterruptible_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_uninterruptible_unlock_spinlock()
196 pub fn sleep_uninterruptible_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_uninterruptible_unlock_mutex()
352 pub fn sleep_unlock_spinlock<T>(&self, events: u64, to_unlock: SpinLockGuard<T>) { in sleep_unlock_spinlock()
H A Dmutex.rs62 pub fn lock(&self) -> MutexGuard<T> { in lock()
92 pub fn try_lock(&self) -> Result<MutexGuard<T>, SystemError> { in try_lock()
/DragonOS/kernel/src/syscall/
H A Duser_access.rs189 pub fn read_from_user<T>(&self, offset: usize) -> Result<&[T], SystemError> { in read_from_user()
197 pub fn read_one_from_user<T>(&self, offset: usize) -> Result<&T, SystemError> { in read_one_from_user()
208 dst: &mut [T], in copy_from_user()
223 dst: &mut T, in copy_one_from_user()
236 pub fn buffer<T>(&self, offset: usize) -> Result<&[T], SystemError> { in buffer()
241 fn convert_with_offset<T>(&self, src: &[u8], offset: usize) -> Result<&[T], SystemError> { in convert_with_offset()
252 byte_buffer.as_ptr() as *const T, in convert_with_offset() constant
259 fn convert_one_with_offset<T>(&self, src: &[u8], offset: usize) -> Result<&T, SystemError> { in convert_one_with_offset()
265 let chunks = unsafe { from_raw_parts(byte_buffer.as_ptr() as *const T, 1) }; in convert_one_with_offset() constant
300 src: &[T], in copy_to_user()
[all …]
/DragonOS/kernel/crates/intertrait/src/
H A Dlib.rs167 fn cast_arc_panic<T: ?Sized + 'static>(_: Arc<dyn Any + Sync + Send>) -> Arc<T> { in cast_arc_panic()
202 cast_ref: fn(from: &dyn Any) -> &T, in new()
203 cast_mut: fn(from: &mut dyn Any) -> &mut T, in new()
204 cast_box: fn(from: Box<dyn Any>) -> Box<T>, in new()
205 cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>, in new()
206 ) -> Caster<T> { in new()
217 cast_ref: fn(from: &dyn Any) -> &T, in new_sync()
218 cast_mut: fn(from: &mut dyn Any) -> &mut T, in new_sync()
219 cast_box: fn(from: Box<dyn Any>) -> Box<T>, in new_sync()
220 cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>, in new_sync()
[all …]
/DragonOS/kernel/crates/bitmap/src/
H A Dbitmap_core.rs18 pub(crate) fn get(&self, n: usize, data: &[T], index: usize) -> Option<bool> { in get()
33 pub(crate) fn set(&self, n: usize, data: &mut [T], index: usize, value: bool) -> Option<bool> { in set()
46 pub(crate) fn set_all(&self, n: usize, data: &mut [T], value: bool) { in set_all()
126 pub(crate) fn next_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in next_index()
149 pub(crate) fn next_false_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in next_false_index()
172 pub(crate) fn prev_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in prev_index()
193 pub(crate) fn prev_false_index(&self, n: usize, data: &[T], index: usize) -> Option<usize> { in prev_false_index()
211 pub(crate) fn invert(&self, n: usize, data: &mut [T]) { in invert()
/DragonOS/kernel/src/mm/
H A Dpercpu.rs86 pub fn get(&self) -> &T { in get()
92 pub fn get_mut(&self) -> &mut T { in get_mut()
99 pub unsafe fn force_get(&self, cpu_id: ProcessorId) -> &T { in force_get()
104 pub unsafe fn force_get_mut(&self, cpu_id: ProcessorId) -> &mut T { in force_get_mut()
/DragonOS/kernel/crates/intertrait/src/cast/
H A Dcast_arc.rs34 fn cast<T: ?Sized + 'static>(self: Arc<Self>) -> Result<Arc<T>, Arc<Self>>; in cast()
39 fn cast<T: ?Sized + 'static>(self: Arc<Self>) -> Result<Arc<T>, Arc<Self>> { in cast()
H A Dcast_box.rs33 fn cast<T: ?Sized + 'static>(self: Box<Self>) -> Result<Box<T>, Box<Self>>; in cast()
38 fn cast<T: ?Sized + 'static>(self: Box<Self>) -> Result<Box<T>, Box<Self>> { in cast()
H A Dcast_mut.rs31 fn cast<T: ?Sized + 'static>(&mut self) -> Option<&mut T>; in cast()
36 fn cast<T: ?Sized + 'static>(&mut self) -> Option<&mut T> { in cast()
H A Dcast_rc.rs33 fn cast<T: ?Sized + 'static>(self: Rc<Self>) -> Result<Rc<T>, Rc<Self>>; in cast()
38 fn cast<T: ?Sized + 'static>(self: Rc<Self>) -> Result<Rc<T>, Rc<Self>> { in cast()
H A Dcast_ref.rs57 fn cast<T: ?Sized + 'static>(&self) -> Option<&T>; in cast()
65 fn cast<T: ?Sized + 'static>(&self) -> Option<&T> { in cast()
/DragonOS/kernel/crates/rust-slabmalloc/src/
H A Dpages.rs365 pub(crate) fn iter_mut<'b: 'a>(&mut self) -> ObjectPageIterMut<'b, T> { in iter_mut() argument
378 pub(crate) fn insert_front<'b>(&'b mut self, mut new_head: &'a mut T) { in insert_front()
396 pub(crate) fn remove_from_list(&mut self, slab_page: &mut T) { in remove_from_list()
428 pub(crate) fn pop<'b>(&'b mut self) -> Option<&'a mut T> { in pop()
507 pub(crate) fn some(n: &mut T) -> Rawlink<T> { in some()
518 pub(crate) unsafe fn resolve<'a>(&self) -> Option<&'a T> { in resolve()
528 pub(crate) unsafe fn resolve_mut<'a>(&mut self) -> Option<&'a mut T> { in resolve_mut()
534 pub(crate) fn take(&mut self) -> Rawlink<T> { in take()
/DragonOS/kernel/src/driver/acpi/
H A Dmod.rs185 unsafe fn map_physical_region<T>( in map_physical_region() argument
217 fn unmap_physical_region<T>(region: &acpi::PhysicalMapping<Self, T>) { in unmap_physical_region() argument
221 region.virtual_start().as_ref() as *const T as usize in unmap_physical_region() constant
/DragonOS/tools/debugging/logmonitor/src/backend/monitor/
H A Dmod.rs24 let x = unsafe { std::ptr::read(buf.as_ptr() as *const T) }; in new() constant
/DragonOS/kernel/src/driver/virtio/
H A Dtransport_pci.rs369 fn config_space<T>(&self) -> Result<NonNull<T>, Error> { in config_space()
518 ) -> Result<NonNull<T>, VirtioPciError> { in get_bar_region()
552 ) -> Result<NonNull<[T]>, VirtioPciError> { in get_bar_region_slice()
562 fn nonnull_slice_from_raw_parts<T>(data: NonNull<T>, len: usize) -> NonNull<[T]> { in nonnull_slice_from_raw_parts()
/DragonOS/kernel/src/driver/base/
H A Dclass.rs82 matcher: &dyn DeviceMatcher<T>, in find_device()
83 data: T, in find_device()
/DragonOS/kernel/crates/intertrait/tests/
H A Don-trait-impl-assoc-type3.rs14 fn concat(&self, prefix: T, a: Self::I1, b: Self::I2) -> String; in concat()
/DragonOS/kernel/src/driver/base/device/
H A Ddriver.rs161 matcher: &dyn DeviceMatcher<T>, in find_device_slow()
162 data: T, in find_device_slow()

12