Home
last modified time | relevance | path

Searched refs:SpinLockGuard (Results 1 – 10 of 10) sorted by relevance

/DragonOS-0.1.5/kernel/src/libs/
Dwait_queue.rs15 spinlock::{SpinLock, SpinLockGuard},
44 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep()
53 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_uninterruptible()
62 pub fn sleep_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_unlock_spinlock()
63 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_unlock_spinlock()
74 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_unlock_mutex()
84 pub fn sleep_uninterruptible_unlock_spinlock<T>(&self, to_unlock: SpinLockGuard<T>) { in sleep_uninterruptible_unlock_spinlock()
85 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_uninterruptible_unlock_spinlock()
96 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in sleep_uninterruptible_unlock_mutex()
112 let mut guard: SpinLockGuard<InnerWaitQueue> = self.0.lock(); in wakeup()
Dspinlock.rs155 pub struct SpinLockGuard<'a, T: 'a> { struct
172 pub fn lock(&self) -> SpinLockGuard<T> { in lock() argument
175 return SpinLockGuard { lock: self }; in lock()
180 impl<T> Deref for SpinLockGuard<'_, T> { implementation
189 impl<T> DerefMut for SpinLockGuard<'_, T> { implementation
196 impl<T> Drop for SpinLockGuard<'_, T> { implementation
Dmutex.rs13 libs::spinlock::SpinLockGuard,
63 let mut inner: SpinLockGuard<MutexInner> = self.inner.lock(); in lock()
115 let mut inner: SpinLockGuard<MutexInner> = self.inner.lock(); in unlock()
/DragonOS-0.1.5/docs/kernel/locking/
Dspinlock.md55 &emsp;&emsp;当需要读取、修改SpinLock保护的数据时,请先使用SpinLock的`lock()`方法。该方法会返回一个`SpinLockGuard`。您可以使用被保护的数据的成员函数…
62 let mut g :SpinLockGuard<Vec<i32>>= x.lock();
94SpinLockGuard`作为守卫。我们在编写代码的时候,保证只有调用`SpinLock`的`lock()`方法加锁后,才能生成一个`SpinLockGuard`。 并且,当我们想要访问受保护的…
104 - 如果函数B需要访问临界区内的数据,那么,函数B应当接收一个类型为`&SpinLockGuard`的参数,这个守卫由函数A获得。这样一来,函数B就能访问临界区内的数据。
/DragonOS-0.1.5/kernel/src/mm/
Dmmio_buddy.rs1 use crate::libs::spinlock::{SpinLock, SpinLockGuard};
84 let list_guard: &mut SpinLockGuard<MmioFreeRegionList> = in give_back_block()
101 low_list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in split_block()
124 list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in query_addr_region()
137 let pop_list: &mut SpinLockGuard<MmioFreeRegionList> = in query_addr_region()
149 let low_list_guard: &mut SpinLockGuard<MmioFreeRegionList> = in query_addr_region()
169 let low_list_guard: &mut SpinLockGuard<MmioFreeRegionList> = in query_addr_region()
264 let list_guard: &mut SpinLockGuard<MmioFreeRegionList> = in mmio_buddy_query_addr_region()
282 list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in push_block()
310 list_guard: &mut SpinLockGuard<MmioFreeRegionList>, in pop_buddy_block()
[all …]
/DragonOS-0.1.5/kernel/src/filesystem/ramfs/
Dmod.rs15 libs::spinlock::{SpinLock, SpinLockGuard},
107 let mut root_guard: SpinLockGuard<RamFSInode> = result.root_inode.0.lock(); in new()
130 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in read_at()
163 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in write_at()
184 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in poll()
290 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in link()
291 let mut other_locked: SpinLockGuard<RamFSInode> = other.0.lock(); in link()
318 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in unlink()
341 let mut inode: SpinLockGuard<RamFSInode> = self.0.lock(); in rmdir()
400 let inode: SpinLockGuard<RamFSInode> = self.0.lock(); in get_entry_name()
/DragonOS-0.1.5/kernel/src/filesystem/procfs/
Dmod.rs22 libs::spinlock::{SpinLock, SpinLockGuard},
269 let mut root_guard: SpinLockGuard<ProcFSInode> = result.root_inode.0.lock(); in new()
324 let mut inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in open()
346 let guard: SpinLockGuard<ProcFSInode> = self.0.lock(); in close()
374 let inode: SpinLockGuard<ProcFSInode> = self.0.lock(); in read_at()
422 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.5/kernel/src/filesystem/devfs/
Dmod.rs12 libs::spinlock::{SpinLock, SpinLockGuard},
60 let mut root_guard: SpinLockGuard<DevFSInode> = devfs.root_inode.0.lock(); in new()
234 let guard:SpinLockGuard<DevFSInode> = self.0.lock(); in add_dir()
273 fn do_create_with_data(&self, mut guard: SpinLockGuard<DevFSInode>,_name: &str, in do_create_with_data()
341 let guard:SpinLockGuard<DevFSInode> = self.0.lock(); in create_with_data()
372 let inode: SpinLockGuard<DevFSInode> = self.0.lock(); in get_entry_name()
439 let inode: SpinLockGuard<DevFSInode> = self.0.lock(); in poll()
/DragonOS-0.1.5/kernel/src/driver/disk/ahci/
Dmod.rs11 use crate::libs::spinlock::{SpinLock, SpinLockGuard};
171 let disks_list: SpinLockGuard<Vec<Arc<LockedAhciDisk>>> = LOCKED_DISKS_LIST.lock(); in get_disks_by_name()
184 let list: SpinLockGuard<Vec<&mut HbaMem>> = LOCKED_HBA_MEM_LIST.lock(); in _port()
/DragonOS-0.1.5/kernel/src/filesystem/fat/
Dfs.rs22 spinlock::{SpinLock, SpinLockGuard},
322 let mut root_guard: SpinLockGuard<FATInode> = result.root_inode.0.lock(); in new()
1352 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in read_at()
1380 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in write_at()
1401 let inode: SpinLockGuard<FATInode> = self.0.lock(); in poll()
1421 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in create()
1461 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in list()
1504 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in find()
1518 let mut guard: SpinLockGuard<FATInode> = self.0.lock(); in unlink()
1521 let target_guard: SpinLockGuard<FATInode> = target.0.lock(); in unlink()
[all …]