/DragonOS-0.1.5/kernel/src/driver/virtio/ |
D | volatile.rs | 4 pub struct ReadOnly<T: Copy>(T); 6 impl<T: Copy> ReadOnly<T> { 8 pub fn new(value: T) -> Self { in new() 16 pub struct WriteOnly<T: Copy>(T); 21 pub struct Volatile<T: Copy>(T); 23 impl<T: Copy> Volatile<T> { 25 pub fn new(value: T) -> Self { in new() 31 pub trait VolatileReadable<T> { 33 unsafe fn vread(self) -> T; in vread() argument 36 impl<T: Copy> VolatileReadable<T> for *const ReadOnly<T> { [all …]
|
D | transport_pci.rs | 337 fn config_space<T>(&self) -> Result<NonNull<T>, Error> { in config_space() argument 339 if size_of::<T>() > config_space.len() * size_of::<u32>() { in config_space() 341 } else if align_of::<T>() > 4 { in config_space() 345 align_of::<T>() in config_space() 475 fn get_bar_region<T>( in get_bar_region() 478 ) -> Result<NonNull<T>, VirtioPciError> { in get_bar_region() argument 487 || size_of::<T>() > struct_info.length as usize in get_bar_region() 495 if vaddr % align_of::<T>() != 0 { in get_bar_region() 498 alignment: align_of::<T>(), in get_bar_region() 507 fn get_bar_region_slice<T>( in get_bar_region_slice() [all …]
|
D | virtio.rs | 82 fn virtio_net<T: Transport>(transport: T) { in virtio_net() argument 83 let mut driver_net = match VirtIONet::<HalImpl, T>::new(transport) { in virtio_net()
|
/DragonOS-0.1.5/kernel/src/libs/ |
D | rwlock.rs | 32 pub struct RwLock<T> { 34 data: UnsafeCell<T>, 39 pub struct RwLockReadGuard<'a, T: 'a> { 40 data: *const T, 48 pub struct RwLockUpgradableGuard<'a, T: 'a> { 49 data: *const T, 50 inner: &'a RwLock<T>, 56 pub struct RwLockWriteGuard<'a, T: 'a> { 57 data: *mut T, 58 inner: &'a RwLock<T>, [all …]
|
D | mutex.rs | 29 pub struct Mutex<T> { 31 data: UnsafeCell<T>, 38 pub struct MutexGuard<'a, T: 'a> { 39 lock: &'a Mutex<T>, 42 unsafe impl<T> Sync for Mutex<T> where T: Send {} 44 impl<T> Mutex<T> { 47 pub const fn new(value: T) -> Self { in new() 61 pub fn lock(&self) -> MutexGuard<T> { in lock() argument 91 pub fn try_lock(&self) -> Result<MutexGuard<T>, i32> { in try_lock() argument 149 impl<T> Deref for MutexGuard<'_, T> { [all …]
|
D | spinlock.rs | 145 pub struct SpinLock<T> { 148 data: UnsafeCell<T>, 155 pub struct SpinLockGuard<'a, T: 'a> { 156 lock: &'a SpinLock<T>, 161 unsafe impl<T> Sync for SpinLock<T> where T: Send {} 163 impl<T> SpinLock<T> { 164 pub const fn new(value: T) -> Self { in new() 172 pub fn lock(&self) -> SpinLockGuard<T> { in lock() argument 180 impl<T> Deref for SpinLockGuard<'_, T> { 181 type Target = T; [all …]
|
D | wait_queue.rs | 62 pub fn sleep_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_unlock_spinlock() argument 73 pub fn sleep_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_unlock_mutex() argument 84 pub fn sleep_uninterruptible_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_uninterruptible_unlock_spinlock() argument 95 pub fn sleep_uninterruptible_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_uninterruptible_unlock_mutex() argument
|
D | ffi_convert.rs | 2 pub trait FFIBind2Rust<T> { 4 fn convert_ref(src: *const T) -> Option<&'static Self>; in convert_ref() 6 fn convert_mut(src: *mut T) -> Option<&'static mut Self>; in convert_mut()
|
/DragonOS-0.1.5/docs/kernel/locking/ |
D | rwlock.md | 29 pub struct RwLock<T> { 31 data: UnsafeCell<T>, 36 pub struct RwLockReadGuard<'a, T: 'a> { 37 data: *const T, 44 pub struct RwLockUpgradableGuard<'a, T: 'a> { 45 data: *const T, 46 inner: &'a RwLock<T>, 52 pub struct RwLockWriteGuard<'a, T: 'a> { 53 data: *mut T, 54 inner: &'a RwLock<T>, [all …]
|
D | mutex.md | 28 pub struct Mutex<T> { 30 data: UnsafeCell<T>, 93 pub const fn new(value: T) -> Self 106 pub fn lock(&self) -> MutexGuard<T> 120 pub fn try_lock(&self) -> Result<MutexGuard<T>, i32>
|
D | spinlock.md | 38 pub struct SpinLock<T> { 41 data: UnsafeCell<T>,
|
/DragonOS-0.1.5/kernel/src/filesystem/devfs/ |
D | mod.rs | 97 pub fn register_device<T: DeviceINode>(&self, name: &str, device: Arc<T>) -> Result<(), i32> { in register_device() 138 pub fn unregister_device<T: DeviceINode>(&self, name: &str, device: Arc<T>) -> Result<(), i32> { in unregister_device() 502 pub fn devfs_register<T: DeviceINode>(name: &str, device: Arc<T>) -> Result<(), i32> { in devfs_register() 508 pub fn devfs_unregister<T: DeviceINode>(name: &str, device: Arc<T>) -> Result<(), i32> { in devfs_unregister()
|
/DragonOS-0.1.5/kernel/src/filesystem/vfs/ |
D | mod.rs | 339 pub fn downcast_ref<T: IndexNode>(&self) -> Option<&T> { in downcast_ref() argument 340 return self.as_any_ref().downcast_ref::<T>(); in downcast_ref()
|
/DragonOS-0.1.5/kernel/src/ktest/ |
D | test-idr.c | 363 int M = N / i, T = M / 3, b = 2 * T; in ktest_idr_case4() local 370 for (int j = b; j >= T; j--) in ktest_idr_case4() 386 for (int j = T - 1; j >= 0; j--) in ktest_idr_case4()
|
/DragonOS-0.1.5/kernel/src/io/ |
D | device.rs | 97 impl<T: BlockDevice> Device for T { implementation
|