Home
last modified time | relevance | path

Searched refs:inner (Results 1 – 25 of 81) sorted by relevance

1234

/DragonOS/kernel/src/sched/
H A Dcompletion.rs15 inner: SpinLock<InnerCompletion>, field
21 inner: SpinLock::new(InnerCompletion::new()), in new()
31 let mut inner = self.inner.lock_irqsave(); in do_wait_for_common() localVariable
33 if inner.done == 0 { in do_wait_for_common()
43 unsafe { inner.wait_queue.sleep_without_schedule() }; in do_wait_for_common()
45 unsafe { inner.wait_queue.sleep_without_schedule_uninterruptible() }; in do_wait_for_common()
47 drop(inner); in do_wait_for_common()
49 inner = self.inner.lock_irqsave(); in do_wait_for_common()
50 if inner.done != 0 || timeout <= 0 { in do_wait_for_common()
54 inner.wait_queue.wakeup(None); in do_wait_for_common()
[all …]
/DragonOS/kernel/src/mm/
H A Dmemblock.rs26 inner: SpinLock<InnerMemBlockManager>, field
45 inner: SpinLock::new(InnerMemBlockManager { in new()
73 let mut inner = self.inner.lock(); in add_range() localVariable
74 if inner.initial_memory_regions_num >= INITIAL_MEMORY_REGIONS_NUM { in add_range()
80 if inner.initial_memory_regions_num == 0 { in add_range()
81 inner.initial_memory_regions[0] = block; in add_range()
82 inner.initial_memory_regions_num += 1; in add_range()
88 .do_add_block(&mut inner, block, false, flags) in add_range()
91 if inner.initial_memory_regions_num + blocks_to_add > INITIAL_MEMORY_REGIONS_NUM { in add_range()
97 self.do_add_block(&mut inner, block, true, flags) in add_range()
[all …]
/DragonOS/kernel/src/libs/
H A Dmutex.rs34 inner: SpinLock<MutexInner>, field
51 inner: SpinLock::new(MutexInner { in new()
64 let mut inner: SpinLockGuard<MutexInner> = self.inner.lock(); in lock() localVariable
66 if inner.is_locked { in lock()
68 if !self.check_pid_in_wait_list(&inner, ProcessManager::current_pcb().pid()) { in lock()
69 inner.wait_list.push_back(ProcessManager::current_pcb()); in lock()
73 drop(inner); in lock()
77 inner.is_locked = true; in lock()
78 drop(inner); in lock()
93 let mut inner = self.inner.lock(); in try_lock() localVariable
[all …]
H A Donce.rs9 inner: AtomicOnceState, field
24 inner: AtomicOnceState::new(OnceState::Incomplete), in new()
35 let r = self.inner.compare_exchange( in call_once()
47 self.inner.store(OnceState::Complete, Ordering::SeqCst); in call_once()
104 self.inner in call_once_force()
114 f(&self.inner.load(Ordering::SeqCst)); in call_once_force()
117 self.inner.store(OnceState::Complete, Ordering::SeqCst); in call_once_force()
123 self.inner.load(Ordering::SeqCst) == OnceState::Complete in is_completed()
129 self.inner.load(Ordering::SeqCst) in state()
H A Dlock_free_flags.rs12 inner: UnsafeCell<T>, field
16 pub unsafe fn new(inner: T) -> Self { in new()
18 inner: UnsafeCell::new(inner), in new()
25 (self.inner.get().as_ref().unwrap() as *const T as *mut T) in get_mut()
32 unsafe { self.inner.get().as_ref().unwrap() } in get()
H A Drwlock.rs56 inner: &'a RwLock<T>, field
65 inner: &'a RwLock<T>, field
247 inner: self, in inner_try_write()
315 inner: self, in inner_try_upgradeable_read()
415 let res = self.inner.lock.compare_exchange( in try_upgrade()
424 let inner = self.inner; in try_upgrade() localVariable
429 data: unsafe { &mut *inner.data.get() }, in try_upgrade()
430 inner, in try_upgrade()
456 while self.inner.current_reader().is_err() { in downgrade()
460 let inner: &RwLock<T> = self.inner; in downgrade() localVariable
[all …]
/DragonOS/kernel/src/driver/input/serio/i8042/
H A Di8042_device.rs27 inner: SpinLock<InnerI8042PlatformDevice>, field
35 inner: SpinLock::new(InnerI8042PlatformDevice { in new()
46 fn inner(&self) -> SpinLockGuard<InnerI8042PlatformDevice> { in inner() method
47 self.inner.lock() in inner()
70 self.inner().device_common.bus.clone() in bus()
74 self.inner().device_common.bus = bus; in set_bus()
77 let mut guard = self.inner(); in class()
86 self.inner().device_common.class = class; in set_class()
90 self.inner().device_common.driver.clone()?.upgrade() in driver()
94 self.inner().device_common.driver = driver; in set_driver()
[all …]
H A Di8042_ports.rs29 inner: SpinLock<InnerI8042AuxPort>, field
43 inner: SpinLock::new(InnerI8042AuxPort { in new()
51 fn inner(&self) -> SpinLockGuard<InnerI8042AuxPort> { in inner() method
52 self.inner.lock() in inner()
66 self.inner().device_common.bus.clone() in bus()
70 self.inner().device_common.bus = bus; in set_bus()
74 self.inner().device_common.class = class; in set_class()
78 let mut guard = self.inner(); in class()
87 self.inner().device_common.driver.clone()?.upgrade() in driver()
91 self.inner().device_common.driver = driver; in set_driver()
[all …]
H A Di8042_driver.rs27 inner: SpinLock<InnerI8042Driver>, field
35 inner: SpinLock::new(InnerI8042Driver { in new()
47 r.inner.lock().self_ref = Arc::downgrade(&r); in new()
74 device.set_driver(Some(self.inner.lock().self_ref.clone())); in probe()
107 self.inner.lock().devices.clone() in devices()
111 let mut guard = self.inner.lock(); in add_device()
121 let mut guard = self.inner.lock(); in delete_device()
126 self.inner.lock().bus = bus; in set_bus()
130 self.inner.lock().bus.clone() in bus()
140 self.inner.lock().kernfs_inode = inode; in set_inode()
[all …]
/DragonOS/kernel/src/driver/block/
H A Dvirtio_blk.rs101 inner: SpinLock<InnerVirtIOBlkManager>, field
114 inner: SpinLock::new(InnerVirtIOBlkManager { in new()
121 fn inner(&self) -> SpinLockGuard<InnerVirtIOBlkManager> { in inner() method
122 self.inner.lock() in inner()
126 let mut inner = self.inner(); in alloc_id() localVariable
127 let idx = inner.id_bmp.first_false_index()?; in alloc_id()
128 inner.id_bmp.set(idx, true); in alloc_id()
130 inner.devname[idx] = Some(name.clone()); in alloc_id()
145 self.inner().id_bmp.set(id, false); in free_id()
146 self.inner().devname[id] = None; in free_id()
[all …]
/DragonOS/kernel/src/driver/net/
H A Dvirtio_net.rs71 inner: SpinLock<InnerVirtIONetDevice>, field
114 inner: SpinLock::new(InnerVirtIONetDevice { in new()
129 fn inner(&self) -> SpinLockGuard<InnerVirtIONetDevice> { in inner() method
130 return self.inner.lock(); in inner()
140 self.inner().kobj_common.kern_inode = inode; in set_inode()
144 self.inner().kobj_common.kern_inode.clone() in inode()
148 self.inner().kobj_common.parent.clone() in parent()
152 self.inner().kobj_common.parent = parent; in set_parent()
156 self.inner().kobj_common.kset.clone() in kset()
160 self.inner().kobj_common.kset = kset; in set_kset()
[all …]
H A Dloopback.rs82 let mut device = self.driver.inner.lock(); in consume()
169 pub inner: Arc<SpinLock<Loopback>>, field
175 let inner = Arc::new(SpinLock::new(Loopback::new())); in new() localVariable
176 LoopbackDriver { inner } in new()
183 inner: self.inner.clone(), in clone()
220 let buffer = self.inner.lock().loopback_receive(); in receive()
256 inner: SpinLock<InnerLoopbackInterface>, field
299 inner: SpinLock::new(InnerLoopbackInterface { in new()
308 fn inner(&self) -> SpinLockGuard<InnerLoopbackInterface> { in inner() method
309 return self.inner.lock(); in inner()
[all …]
/DragonOS/kernel/src/driver/base/block/
H A Dmanager.rs37 inner: SpinLock<InnerBlockDevManager>, field
46 inner: SpinLock::new(InnerBlockDevManager { in new()
52 fn inner(&self) -> SpinLockGuard<InnerBlockDevManager> { in inner() method
53 self.inner.lock() in inner()
58 let mut inner = self.inner(); in register() localVariable
60 if inner.disks.contains_key(dev_name) { in register()
63 inner.disks.insert(dev_name.clone(), dev.clone()); in register()
66 inner.disks.remove(dev_name); in register()
111 Some(dev.blkdev_meta().inner().gendisks.alloc_idx()), in register_gendisk_with_range()
123 let mut meta_inner = blk_meta.inner(); in register_gendisk()
[all …]
/DragonOS/kernel/src/driver/scsi/
H A Dmod.rs28 inner: SpinLock<InnerScsiManager>, field
41 inner: SpinLock::new(InnerScsiManager { in new()
48 fn inner(&self) -> SpinLockGuard<InnerScsiManager> { in inner() method
49 self.inner.lock() in inner()
53 let mut inner = self.inner(); in alloc_id() localVariable
54 let idx = inner.id_bmp.first_false_index()?; in alloc_id()
55 inner.id_bmp.set(idx, true); in alloc_id()
57 inner.devname[idx] = Some(name.clone()); in alloc_id()
72 self.inner().id_bmp.set(id, false); in free_id()
73 self.inner().devname[id] = None; in free_id()
/DragonOS/kernel/src/exception/
H A Dirqdata.rs30 inner: SpinLock<InnerIrqData>, field
44 inner: SpinLock::new(InnerIrqData { in new()
60 let common_data = self.inner.lock_irqsave().common_data.clone(); in irqd_set()
67 let common_data = self.inner.lock_irqsave().common_data.clone(); in irqd_clear()
76 self.inner.lock_irqsave().desc.upgrade() in irq_desc()
80 self.inner.lock_irqsave().desc = desc; in set_irq_desc()
85 self.inner.lock_irqsave().desc = Weak::new(); in clear_irq_desc()
89 self.inner.lock_irqsave().hwirq in hardware_irq()
94 self.inner in is_level_type()
97 .inner in is_level_type()
[all …]
/DragonOS/kernel/src/driver/net/e1000e/
H A De1000e_driver.rs45 pub inner: Arc<SpinLock<E1000EDevice>>, field
88 inner: SpinLock<InnerE1000EInterface>, field
117 let mut device = self.driver.inner.lock(); in consume()
133 let inner: Arc<SpinLock<E1000EDevice>> = Arc::new(SpinLock::new(device)); in new() localVariable
134 let result = E1000EDriver { inner }; in new()
142 inner: self.inner.clone(), in clone()
155 match self.inner.lock().e1000e_receive() { in receive()
169 match self.inner.lock().e1000e_can_transmit() { in transmit()
197 smoltcp::wire::EthernetAddress(driver.inner.lock().mac_address()), in new()
210 inner: SpinLock::new(InnerE1000EInterface { in new()
[all …]
/DragonOS/kernel/src/arch/x86_64/driver/
H A Drtc.rs39 inner: SpinLock<InnerCmosRtc>, field
48 inner: SpinLock::new(InnerCmosRtc { in new()
57 r.inner().device_common.can_match = true; in new()
62 fn inner(&self) -> SpinLockGuard<InnerCmosRtc> { in inner() method
63 self.inner.lock() in inner()
104 self.inner().device_state == DeviceState::Initialized in is_initialized()
108 self.inner().device_state = set_state; in set_state()
122 self.inner().device_common.bus = bus; in set_bus()
126 self.inner().device_common.class = class; in set_class()
130 self.inner() in class()
[all …]
H A Dhpet.rs54 inner: RwLock<InnerHpet>, field
103 inner: RwLock::new(InnerHpet { in new()
172 fn inner(&self) -> RwLockReadGuard<InnerHpet> { in inner() method
173 self.inner.read() in inner()
177 self.inner.write() in inner_mut()
182 let inner = self.inner(); in timer() localVariable
187 inner in timer()
194 return Some((inner, timer_regs)); in timer()
201 let inner = self.inner_mut(); in timer_mut() localVariable
206 inner in timer_mut()
[all …]
/DragonOS/kernel/src/driver/base/platform/
H A Dplatform_device.rs131 inner: SpinLock<InnerPlatformBusDevice>, field
144 inner: SpinLock::new(InnerPlatformBusDevice::new(data)), in new()
166 let state = self.inner.lock().state; in is_initialized()
176 let state = &mut self.inner.lock().state; in set_state()
186 let state = self.inner.lock().state; in get_state()
190 fn inner(&self) -> SpinLockGuard<InnerPlatformBusDevice> { in inner() method
191 self.inner.lock() in inner()
223 self.inner().kobject_common.parent.clone() in parent()
227 self.inner().kobject_common.kern_inode.clone() in inode()
231 self.inner().kobject_common.kern_inode = inode; in set_inode()
[all …]
/DragonOS/kernel/src/driver/pci/
H A Draw_device.rs27 inner: RwLock<InnerPciGeneralDevice>, field
49 inner: RwLock::new(InnerPciGeneralDevice { in from()
115 self.inner.read().device_common.bus.clone() in bus()
119 let mut guard = self.inner.write(); in class()
129 self.inner.read().device_common.driver.clone()?.upgrade() in driver()
149 self.inner.write().device_common.bus = bus; in set_bus()
155 self.inner.write().device_common.class = class; in set_class()
159 self.inner.write().device_common.driver = driver in set_driver()
167 self.inner.write().device_common.parent.clone() in dev_parent()
171 self.inner.write().device_common.parent = dev_parent; in set_dev_parent()
[all …]
H A Ddevice.rs101 inner: SpinLock<InnerPciBusDevice>, field
109 inner: SpinLock::new(InnerPciBusDevice { in new()
120 fn inner(&self) -> SpinLockGuard<InnerPciBusDevice> { in inner() method
121 self.inner.lock() in inner()
137 self.inner().kobject_common.parent.clone() in parent()
141 self.inner().kobject_common.kern_inode.clone() in inode()
145 self.inner().kobject_common.kern_inode = inode; in set_inode()
149 self.inner().kobject_common.kobj_type in kobj_type()
153 self.inner().kobject_common.kobj_type = ktype in set_kobj_type()
157 self.inner().kobject_common.kset.clone() in kset()
[all …]
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Dfbmem.rs120 inner: RwLock<InnerFrameBufferManager>, field
133 inner: RwLock::new(InnerFrameBufferManager { in new()
168 let mut inner = self.inner.write(); in register_fb() localVariable
169 inner.registered_fbs[id.data() as usize] = Some(fb.clone() as Arc<dyn FrameBuffer>); in register_fb()
190 let inner = self.inner.read(); in find_fb_by_id() localVariable
191 return Ok(inner.registered_fbs[id.data() as usize].clone()); in find_fb_by_id()
196 if self.inner.read().registered_fbs[i].is_none() { in generate_fb_id()
212 inner: SpinLock<InnerFbDevice>, field
220 inner: SpinLock::new(InnerFbDevice { in new()
234 let mut inner_guard = r.inner.lock(); in new()
[all …]
/DragonOS/kernel/src/driver/serial/serial8250/
H A Dmod.rs200 inner: RwLock<InnerSerial8250ISADevices>, field
210 inner: RwLock::new(InnerSerial8250ISADevices::new()), in new()
242 return self.inner.read().device_state == DeviceState::Initialized; in is_initialized()
246 self.inner.write().device_state = set_state; in set_state()
255 self.inner.read().device_common.bus.clone() in bus()
259 self.inner.write().device_common.bus = bus; in set_bus()
271 self.inner.read().device_common.driver.clone()?.upgrade() in driver()
275 self.inner.write().device_common.driver = driver; in set_driver()
279 self.inner.read().device_common.can_match in can_match()
283 self.inner.write().device_common.can_match = can_match; in set_can_match()
[all …]
/DragonOS/kernel/src/driver/rtc/
H A Dsysfs.rs47 inner: SpinLock<InnerRtcGeneralDevice>, field
72 inner: SpinLock::new(InnerRtcGeneralDevice { in new()
83 fn inner(&self) -> SpinLockGuard<InnerRtcGeneralDevice> { in inner() method
84 self.inner.lock() in inner()
88 self.inner().class_ops = Some(class_ops); in set_class_ops()
92 self.inner().class_ops in class_ops()
100 self.inner().hc2sysfs_result = val; in set_hc2sys_result()
104 self.inner().hc2sysfs_result.clone() in hc2sysfs_result()
130 self.inner().device_common.bus = bus; in set_bus()
134 self.inner().device_common.get_bus_weak_or_clear() in bus()
[all …]
H A Drtc_cmos.rs42 inner: SpinLock<InnerCmosPlatformDriver>, field
51 inner: SpinLock::new(InnerCmosPlatformDriver { in new()
59 fn inner(&self) -> SpinLockGuard<InnerCmosPlatformDriver> { in inner() method
60 self.inner.lock() in inner()
129 self.inner().driver_common.devices.clone() in devices()
133 self.inner().driver_common.push_device(device); in add_device()
137 self.inner().driver_common.delete_device(device); in delete_device()
141 self.inner().driver_common.bus = bus; in set_bus()
145 self.inner().driver_common.bus.clone() in bus()
155 self.inner().kobject_common.kern_inode = inode; in set_inode()
[all …]

1234