/DragonOS-0.1.9/tools/debugging/logmonitor/src/constant/ |
D | mod.rs | 1 use std::sync::RwLock; 6 pub static CMD_ARGS: RwLock<Option<CommandLineArgs>> = RwLock::new(None);
|
/DragonOS-0.1.9/docs/kernel/locking/ |
D | rwlock.md | 1 # RwLock读写锁 16 …的一致性. 数据会被包裹在一个RwLock的数据结构中, 一切的访问必须通过RwLock的数据结构进行访问和修改. 每个要访问共享数据的会获得一个守卫(guard), 只读进程获得READER(读… 27 #### 2.3.1 RwLock数据结构 29 pub struct RwLock<T> { 46 inner: &'a RwLock<T>, 54 inner: &'a RwLock<T>, 58 #### 2.3.5 RwLock的lock的结构介绍 79 ### 3.1 RwLock的主要API 81 ///功能: 输入需要保护的数据类型data,返回一个新的RwLock类型. 129 static LOCK: RwLock<u32> = RwLock::new(100 as u32);
|
/DragonOS-0.1.9/kernel/src/init/ |
D | mod.rs | 6 libs::rwlock::RwLock, 15 static BOOT_PARAMS: RwLock<BootParams> = RwLock::new(BootParams::new()); 18 pub fn boot_params() -> &'static RwLock<BootParams> { in boot_params()
|
/DragonOS-0.1.9/kernel/src/driver/virtio/ |
D | irq.rs | 6 use crate::{driver::base::device::DeviceId, init::initcall::INITCALL_CORE, libs::rwlock::RwLock}; 18 map: RwLock<HashMap<Arc<DeviceId>, Arc<dyn VirtIODevice>>>, 24 map: RwLock::new(HashMap::new()), in new()
|
/DragonOS-0.1.9/kernel/src/driver/base/ |
D | subsys.rs | 8 rwlock::{RwLock, RwLockReadGuard}, 33 ksets: RwLock<SubSysKSets>, 40 devices: RwLock<Vec<Arc<dyn Device>>>, 42 drivers: RwLock<Vec<Arc<dyn Driver>>>, 74 ksets: RwLock::new(SubSysKSets::new()), in new() 78 devices: RwLock::new(Vec::new()), in new() 79 drivers: RwLock::new(Vec::new()), in new()
|
D | kset.rs | 14 libs::rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard}, 21 kobjects: RwLock<Vec<Weak<dyn KObject>>>, 23 inner: RwLock<InnerKSet>, 27 parent_data: RwLock<KSetParentData>, 49 kobjects: RwLock::new(Vec::new()), in new() 50 inner: RwLock::new(InnerKSet::new(name)), in new() 52 parent_data: RwLock::new(KSetParentData::new(None, None)), in new()
|
D | kobject.rs | 17 rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard}, 95 pub struct LockedKObjectState(RwLock<KObjectState>); 100 LockedKObjectState(RwLock::new(state)) in new() 105 type Target = RwLock<KObjectState>;
|
D | cpu.rs | 11 libs::rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard}, 111 inner: RwLock<InnerCpuSubSystemFakeRootDevice>, 118 inner: RwLock::new(InnerCpuSubSystemFakeRootDevice::new()), in new()
|
/DragonOS-0.1.9/kernel/src/driver/firmware/efi/ |
D | mod.rs | 3 use crate::{libs::rwlock::RwLock, mm::PhysAddr}; 20 inner: RwLock<InnerEFIManager>, 47 inner: RwLock::new(InnerEFIManager { in new()
|
/DragonOS-0.1.9/kernel/src/process/ |
D | mod.rs | 40 rwlock::{RwLock, RwLockReadGuard, RwLockUpgradableGuard, RwLockWriteGuard}, 546 basic: RwLock<ProcessBasicInfo>, 553 kernel_stack: RwLock<KernelStack>, 556 syscall_stack: RwLock<KernelStack>, 563 sig_info: RwLock<ProcessSignalInfo>, 570 parent_pcb: RwLock<Weak<ProcessControlBlock>>, 572 real_parent_pcb: RwLock<Weak<ProcessControlBlock>>, 575 children: RwLock<Vec<Pid>>, 581 thread: RwLock<ThreadInfo>, 634 kernel_stack: RwLock::new(kstack), in do_create_pcb() [all …]
|
/DragonOS-0.1.9/kernel/src/libs/ |
D | rwlock.rs | 38 pub struct RwLock<T> { struct 57 inner: &'a RwLock<T>, argument 66 inner: &'a RwLock<T>, 70 unsafe impl<T: Send> Send for RwLock<T> {} implementation 71 unsafe impl<T: Send + Sync> Sync for RwLock<T> {} implementation 74 impl<T> RwLock<T> { implementation 78 return RwLock { in new() 88 let RwLock { data, .. } = self; in into_inner() localVariable 377 impl<T: Default> Default for RwLock<T> { implementation 384 impl<T> From<T> for RwLock<T> { implementation [all …]
|
D | notifier.rs | 6 libs::{rwlock::RwLock, spinlock::SpinLock}, 147 pub struct BlockingNotifierChain<V: Clone + Copy, T>(RwLock<NotifierChain<V, T>>); 151 Self(RwLock::new(NotifierChain::<V, T>::new())) in new()
|
/DragonOS-0.1.9/kernel/src/driver/video/ |
D | mod.rs | 10 rwlock::{RwLock, RwLockReadGuard}, 36 device_buffer: RwLock<ScmBufferInfo>, 37 refresh_target: RwLock<Option<Arc<SpinLock<Box<[u32]>>>>>, 219 device_buffer: RwLock::new(device_buffer), in video_init() 220 refresh_target: RwLock::new(None), in video_init()
|
/DragonOS-0.1.9/tools/debugging/logmonitor/src/backend/ |
D | mod.rs | 3 sync::{mpsc, Arc, Mutex, RwLock, Weak}, 21 main_thread: RwLock<Option<std::thread::JoinHandle<()>>>, 32 main_thread: RwLock::new(None), in new()
|
/DragonOS-0.1.9/kernel/src/net/ |
D | mod.rs | 8 use crate::{driver::net::NetDriver, libs::rwlock::RwLock}; 19 …pub static ref NET_DRIVERS: RwLock<BTreeMap<usize, Arc<dyn NetDriver>>> = RwLock::new(BTreeMap::ne…
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/smp/ |
D | mod.rs | 15 libs::rwlock::RwLock, 131 ia64_cpu_to_sapicid: RwLock<[Option<usize>; PerCpu::MAX_CPU_NUM as usize]>, 137 ia64_cpu_to_sapicid: RwLock::new([None; PerCpu::MAX_CPU_NUM as usize]), in new()
|
/DragonOS-0.1.9/kernel/src/driver/tty/ |
D | tty_core.rs | 12 rwlock::{RwLock, RwLockReadGuard, RwLockUpgradableGuard, RwLockWriteGuard}, 46 termios: RwLock::new(termios), in new() 48 flags: RwLock::new(TtyFlag::empty()), in new() 50 window_size: RwLock::new(WindowSize::default()), in new() 53 port: RwLock::new(None), in new() 290 termios: RwLock<Termios>, 292 flags: RwLock<TtyFlag>, 297 window_size: RwLock<WindowSize>, 303 port: RwLock<Option<Arc<dyn TtyPort>>>,
|
/DragonOS-0.1.9/kernel/src/filesystem/kernfs/ |
D | mod.rs | 15 rwlock::RwLock, 92 inner: RwLock::new(InnerKernFSInode { in create_root_inode() 99 fs: RwLock::new(Weak::new()), in create_root_inode() 112 inner: RwLock<InnerKernFSInode>, 114 fs: RwLock<Weak<KernFS>>, 385 inner: RwLock::new(InnerKernFSInode { in new() 392 fs: RwLock::new(Weak::new()), in new()
|
/DragonOS-0.1.9/kernel/src/driver/serial/serial8250/ |
D | serial8250_pio.rs | 13 libs::rwlock::RwLock, 76 inner: RwLock<Serial8250PIOPortInner>, 86 inner: RwLock::new(Serial8250PIOPortInner::new()), in new()
|
D | mod.rs | 28 libs::rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard}, 158 inner: RwLock<InnerSerial8250ISADevices>, 168 inner: RwLock::new(InnerSerial8250ISADevices::new()), in new() 376 inner: RwLock<InnerSerial8250ISADriver>, 385 inner: RwLock::new(InnerSerial8250ISADriver::new()), in new()
|
/DragonOS-0.1.9/kernel/src/driver/keyboard/ |
D | ps2_keyboard.rs | 30 libs::{keyboard_parser::TypeOneFSM, rwlock::RwLock, spinlock::SpinLock}, 52 pub struct LockedPS2KeyBoardInode(RwLock<PS2KeyBoardInode>); 94 let result = Arc::new(LockedPS2KeyBoardInode(RwLock::new(inode))); in new()
|
/DragonOS-0.1.9/kernel/src/exception/ |
D | softirq.rs | 17 libs::rwlock::RwLock, 102 table: RwLock<[Option<Arc<dyn SoftirqVec>>; MAX_SOFTIRQ_NUM as usize]>, 126 table: RwLock::new(data), in new()
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/driver/ |
D | hpet.rs | 27 rwlock::{RwLock, RwLockReadGuard, RwLockWriteGuard}, 47 inner: RwLock<InnerHpet>, 95 inner: RwLock::new(InnerHpet { in new()
|
/DragonOS-0.1.9/kernel/src/time/ |
D | timekeeping.rs | 8 libs::rwlock::RwLock, 38 pub struct Timekeeper(RwLock<TimekeeperData>); 155 unsafe { __TIMEKEEPER = Some(Timekeeper(RwLock::new(TimekeeperData::new()))) }; in timekeeper_init()
|
/DragonOS-0.1.9/kernel/src/driver/acpi/ |
D | sysfs.rs | 13 libs::rwlock::RwLock, 29 static mut __ACPI_TABLE_ATTR_LIST: Option<RwLock<Vec<Arc<AttrAcpiTable>>>> = None; 57 fn acpi_table_attr_list() -> &'static RwLock<Vec<Arc<AttrAcpiTable>>> { in acpi_table_attr_list() 66 __ACPI_TABLE_ATTR_LIST = Some(RwLock::new(Vec::new())); in acpi_sysfs_init()
|