/DragonOS-0.1.8/kernel/src/libs/ |
D | wait_queue.rs | 16 spinlock::{SpinLock, SpinLockGuard}, 45 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep() 58 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_with_func() 83 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_without_schedule() 90 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_uninterruptible() 99 pub fn sleep_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_unlock_spinlock() 100 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_unlock_spinlock() 111 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_unlock_mutex() 121 pub fn sleep_uninterruptible_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_uninterruptible_unlock_spinlock() 122 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_uninterruptible_unlock_spinlock() [all …]
|
D | spinlock.rs | 174 pub struct SpinLockGuard<'a, T: 'a> { struct 179 impl<'a, T: 'a> SpinLockGuard<'a, T> { argument 210 pub fn lock(&self) -> SpinLockGuard<T> { in lock() 213 return SpinLockGuard { in lock() 219 pub fn lock_irqsave(&self) -> SpinLockGuard<T> { in lock_irqsave() 224 return SpinLockGuard { in lock_irqsave() 230 pub fn try_lock(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock() 232 return Ok(SpinLockGuard { in try_lock() 240 pub fn try_lock_irqsave(&self) -> Result<SpinLockGuard<T>, SystemError> { in try_lock_irqsave() 243 return Ok(SpinLockGuard { in try_lock_irqsave() [all …]
|
D | mutex.rs | 13 libs::spinlock::SpinLockGuard, 64 let mut inner: SpinLockGuard<MutexInner> = self.inner.lock(); in lock() 116 let mut inner: SpinLockGuard<MutexInner> = self.inner.lock(); in unlock()
|
/DragonOS-0.1.8/docs/kernel/locking/ |
D | spinlock.md | 55   当需要读取、修改SpinLock保护的数据时,请先使用SpinLock的`lock()`方法。该方法会返回一个`SpinLockGuard`。您可以使用被保护的数据的成员函数… 62 let mut g :SpinLockGuard<Vec<i32>>= x.lock(); 94 …SpinLockGuard`作为守卫。我们在编写代码的时候,保证只有调用`SpinLock`的`lock()`方法加锁后,才能生成一个`SpinLockGuard`。 并且,当我们想要访问受保护的… 104 - 如果函数B需要访问临界区内的数据,那么,函数B应当接收一个类型为`&SpinLockGuard`的参数,这个守卫由函数A获得。这样一来,函数B就能访问临界区内的数据。
|
/DragonOS-0.1.8/kernel/src/mm/ |
D | mmio_buddy.rs | 1 use crate::libs::spinlock::{SpinLock, SpinLockGuard}; 139 low_list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in split_block() 162 list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in query_addr_region() 175 let pop_list: &mut SpinLockGuard<MmioFreeRegionList> = in query_addr_region() 187 let low_list_guard: &mut SpinLockGuard<MmioFreeRegionList> = in query_addr_region() 207 let low_list_guard: &mut SpinLockGuard<MmioFreeRegionList> = in query_addr_region() 299 let list_guard: &mut SpinLockGuard<MmioFreeRegionList> = in mmio_buddy_query_addr_region() 317 list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in push_block() 345 list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in pop_buddy_block() 377 list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in pop_block() [all …]
|
D | ucontext.rs | 24 spinlock::{SpinLock, SpinLockGuard}, 165 let vma_guard: SpinLockGuard<'_, VMA> = vma.lock(); in try_clone() 810 pub fn lock(&self) -> SpinLockGuard<VMA> { in lock()
|
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/ |
D | mod.rs | 12 libs::spinlock::{SpinLock, SpinLockGuard}, 105 let mut root_guard: SpinLockGuard<RamFSInode> = result.root_inode.0.lock(); in new() 128 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in read_at() 161 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in write_at() 182 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in poll() 286 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in link() 287 let mut other_locked: SpinLockGuard<RamFSInode> = other.0.lock(); in link() 314 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in unlink() 337 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in rmdir() 396 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in get_entry_name()
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 20 libs::spinlock::{SpinLock, SpinLockGuard}, 271 let mut root_guard: SpinLockGuard<ProcFSInode> = result.root_inode.0.lock(); in new() 326 let mut inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in open() 348 let guard: SpinLockGuard<ProcFSInode> = self.0.lock(); in close() 376 let inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in read_at() 424 let inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in poll() 532 let mut inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in link() 533 let mut other_locked: SpinLockGuard<ProcFSInode> = other.0.lock(); in link() 560 let mut inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in unlink() 611 let inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in get_entry_name()
|
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/ |
D | mod.rs | 6 libs::spinlock::{SpinLock, SpinLockGuard}, 103 let mut root_guard: SpinLockGuard<SysFSInode> = sysfs.root_inode.0.lock(); in new() 190 let inode: SpinLockGuard<SysFSInode> = self.0.lock(); in poll() 209 let inode: SpinLockGuard<SysFSInode> = self.0.lock(); in get_entry_name() 287 mut guard: SpinLockGuard<SysFSInode>, in do_create_with_data() 340 let guard: SpinLockGuard<SysFSInode> = self.0.lock(); in add_dir()
|
/DragonOS-0.1.8/kernel/src/filesystem/devfs/ |
D | mod.rs | 12 libs::spinlock::{SpinLock, SpinLockGuard}, 61 let mut root_guard: SpinLockGuard<DevFSInode> = devfs.root_inode.0.lock(); in new() 249 let guard: SpinLockGuard<DevFSInode> = self.0.lock(); in add_dir() 290 mut guard: SpinLockGuard<DevFSInode>, in do_create_with_data() 363 let guard: SpinLockGuard<DevFSInode> = self.0.lock(); in create_with_data() 394 let inode: SpinLockGuard<DevFSInode> = self.0.lock(); in get_entry_name() 461 let inode: SpinLockGuard<DevFSInode> = self.0.lock(); in poll()
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | mod.rs | 11 use crate::libs::spinlock::{SpinLock, SpinLockGuard}; 172 let disks_list: SpinLockGuard<Vec<Arc<LockedAhciDisk>>> = LOCKED_DISKS_LIST.lock(); in get_disks_by_name() 185 let list: SpinLockGuard<Vec<&mut HbaMem>> = LOCKED_HBA_MEM_LIST.lock(); in _port()
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | fs.rs | 20 spinlock::{SpinLock, SpinLockGuard}, 328 let mut root_guard: SpinLockGuard<FATInode> = result.root_inode.0.lock(); in new() 1362 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in read_at() 1390 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in write_at() 1411 let inode: SpinLockGuard<FATInode> = self.0.lock(); in poll() 1429 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in create() 1468 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in resize() 1507 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in list() 1550 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in find() 1564 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in unlink() [all …]
|
/DragonOS-0.1.8/kernel/src/net/ |
D | syscall.rs | 14 libs::spinlock::SpinLockGuard, 84 let socket: SpinLockGuard<Box<dyn Socket>> = socket_inode.inner(); in setsockopt()
|
D | socket.rs | 16 spinlock::{SpinLock, SpinLockGuard}, 1131 pub fn inner(&self) -> SpinLockGuard<Box<dyn Socket>> { in inner()
|