Home
last modified time | relevance | path

Searched refs:r (Results 1 – 25 of 97) sorted by relevance

1234

/DragonOS/kernel/src/driver/rtc/
H A Dclass.rs54 let r = Self { in new() localVariable
57 let r = Arc::new(r); in new() localVariable
58 r.subsystem() in new()
59 .set_class(Some(Arc::downgrade(&r) as Weak<dyn Class>)); in new()
61 return r; in new()
93 let r = rtc_read_time(dev); in rtc_hctosys() localVariable
94 if let Err(e) = r { in rtc_hctosys()
99 let time = r.unwrap(); in rtc_hctosys()
101 let r = do_settimeofday64(timespec64); in rtc_hctosys() localVariable
102 dev.set_hc2sys_result(r); in rtc_hctosys()
/DragonOS/build-scripts/kernel_build/src/kconfig/
H A Dmod.rs18 let mut r = Vec::new(); in build() localVariable
21 Self::dfs(m, &mut r); in build()
26 let features = ConfigParser::parse_d_configs(&r); in build()
61 fn dfs(module: &Module, r: &mut Vec<PathBuf>) { in dfs()
73 Self::dfs(m, r); in dfs()
77 r.push(d_config_path); in dfs()
90 let r = Self::include(&cfg_content); in parse_kernel_config() localVariable
92 return r; in parse_kernel_config()
97 let mut r = Vec::new(); in parse_d_configs() localVariable
99 r.extend(Self::parse_d_config(d_config)); in parse_d_configs()
[all …]
/DragonOS/kernel/src/driver/tty/
H A Dsysfs.rs37 let r = Self { in new() localVariable
40 let r = Arc::new(r); in new() localVariable
41 r.subsystem() in new()
42 .set_class(Some(Arc::downgrade(&r) as Weak<dyn Class>)); in new()
44 return r; in new()
/DragonOS/kernel/src/driver/base/device/
H A Ddd.rs72 let mut r = Ok(false); in do_device_attach() localVariable
98 let r = self.do_device_attach_driver(driver, &mut data); in do_device_attach() localVariable
99 if unlikely(r.is_err()) { in do_device_attach()
102 } else if r.unwrap() { in do_device_attach()
109 r = Ok(true); in do_device_attach()
130 return r; in do_device_attach()
153 let r = bus.match_device(&data.dev, driver); in do_device_attach_driver() localVariable
155 if let Err(e) = r { in do_device_attach_driver()
165 } else if !r.unwrap() { in do_device_attach_driver()
207 let r = driver_manager().driver_sysfs_add(dev); in device_bind_driver() localVariable
[all …]
/DragonOS/kernel/src/mm/allocator/
H A Dkernel_allocator.rs109 let r = self.local_alloc_zeroed(layout); in alloc() localVariable
111 alloc_debug_log(klog_types::LogSource::Buddy, layout, r); in alloc()
113 alloc_debug_log(klog_types::LogSource::Slab, layout, r); in alloc()
115 return r; in alloc()
119 let r = self.local_alloc_zeroed(layout); in alloc_zeroed() localVariable
121 alloc_debug_log(klog_types::LogSource::Buddy, layout, r); in alloc_zeroed()
123 alloc_debug_log(klog_types::LogSource::Slab, layout, r); in alloc_zeroed()
125 return r; in alloc_zeroed()
H A Dbump.rs164 let r = (PhysAddr(res_page_phys), count); in allocate() localVariable
165 self.ensure_early_mapping(r.0, r.1); in allocate()
166 return Some(r); in allocate()
/DragonOS/kernel/src/arch/riscv64/mm/
H A Dmod.rs52 let r = sbi_rt::remote_sfence_vma(Into::into(cpu), address.data(), size); in remote_invalidate_page() localVariable
53 if r.is_ok() { in remote_invalidate_page()
56 return Err(r); in remote_invalidate_page()
63 let r = Self::remote_invalidate_page( in remote_invalidate_all() localVariable
69 return r; in remote_invalidate_all()
73 let r = sbi_rt::remote_sfence_vma(mask, 0, 1 << RiscV64MMArch::ENTRY_ADDRESS_SHIFT); in remote_invalidate_all_with_mask() localVariable
74 if r.is_ok() { in remote_invalidate_all_with_mask()
77 return Err(r); in remote_invalidate_all_with_mask()
220 let r = KERNEL_BEGIN_VA + (phys - KERNEL_BEGIN_PA); in phys_2_virt() localVariable
221 return Some(r); in phys_2_virt()
[all …]
/DragonOS/kernel/src/debug/klog/
H A Dmm.rs66 let r = __MM_ALLOCATOR_LOG_CHANNEL.buf.push(log); in log() localVariable
68 if let Err(r) = r { in log()
75 log = r.into_inner(); in log()
/DragonOS/tools/debugging/logmonitor/src/backend/
H A Dmod.rs28 let r = Arc::new(Self { in new() localVariable
36 r.data.lock().unwrap().kmem_path = Some(PathBuf::from(&command_line_args.kmem)); in new()
40 let instance = r.clone(); in new()
42 let dt = r.data.clone(); in new()
49 *r.main_thread.write().unwrap() = Some(main_thread); in new()
51 return r; in new()
/DragonOS/kernel/src/driver/acpi/
H A Dsysfs.rs161 let mut r = Self { in new() localVariable
169 if attr.name == r.name { in new()
170 r.instance = attr.instance; in new()
174 r.instance += 1; in new()
175 if r.instance > ACPI_MAX_TABLE_INSTANCES as isize { in new()
176 warn!("too many table instances. name: {}", r.name); in new()
192 if r.instance > 1 || (r.instance == 1 && has_multiple_instances) { in new()
193 r.filename = format!("{}{}", r.name, r.instance); in new()
195 r.filename = r.name.clone(); in new()
198 let result = Arc::new(r); in new()
/DragonOS/kernel/src/libs/
H A Drwlock.rs123 let r = self.inner_try_read(); in try_read() localVariable
124 if r.is_none() { in try_read()
127 return r; in try_read()
212 let r = self.inner_try_write(); in try_write() localVariable
213 if r.is_none() { in try_write()
217 return r; in try_write()
226 let r = self.inner_try_write().map(|mut g| { in try_write_irqsave() localVariable
230 if r.is_none() { in try_write_irqsave()
234 return r; in try_write_irqsave()
289 let r = self.inner_try_upgradeable_read(); in try_upgradeable_read() localVariable
[all …]
/DragonOS/kernel/src/mm/
H A Ducontext.rs585 for r in regions { in munmap()
586 let r = r.lock_irqsave().region; in munmap() localVariable
587 let r = self.mappings.remove_vma(&r).unwrap(); in munmap() localVariable
588 let intersection = r.lock_irqsave().region().intersect(&to_unmap).unwrap(); in munmap()
589 let split_result = r.extract(intersection, &self.user_mapper.utable).unwrap(); in munmap()
603 r.unmap(&mut self.user_mapper.utable, &mut flusher); in munmap()
638 for r in regions { in mprotect()
640 let r = *r.lock_irqsave().region(); in mprotect() localVariable
641 let r = self.mappings.remove_vma(&r).unwrap(); in mprotect() localVariable
643 let intersection = r.lock_irqsave().region().intersect(&region).unwrap(); in mprotect()
[all …]
H A Dc_adapter.rs93 let r = mmio_pool().create_mmio(size as usize); in rs_mmio_create() localVariable
94 if let Err(e) = r { in rs_mmio_create()
97 let space_guard = r.unwrap(); in rs_mmio_create()
/DragonOS/kernel/src/driver/base/platform/
H A Dmod.rs91 let r = bus_register(paltform_bus.clone() as Arc<dyn Bus>); in platform_bus_init() localVariable
92 if r.is_err() { in platform_bus_init()
95 return r; in platform_bus_init()
101 return r; in platform_bus_init()
/DragonOS/tools/debugging/logmonitor/src/backend/monitor/
H A Dmm.rs53 let r = Self { in new() localVariable
63 let r = Arc::new(r); in new() localVariable
65 let self_ref = Arc::downgrade(&r); in new()
66 let r_ptr = r.as_ref() as *const Self as *mut Self; in new()
70 return r; in new()
197 let r = kmem_file in process_logs() localVariable
200 assert!(r == buf.len()); in process_logs()
/DragonOS/kernel/src/driver/base/
H A Dkobject.rs148 let r = attr.show(kobj, buf).map_err(|e| { in show() localVariable
156 return r; in show()
165 let r = attr.store(kobj, buf).map_err(|e| { in store() localVariable
173 return r; in store()
206 let r = Self::create_dir(kobj.clone()); in add_kobj() localVariable
208 if let Err(e) = r { in add_kobj()
233 let r = sysfs_instance().create_groups(&kobj, groups); in create_dir() localVariable
234 if let Err(e) = r { in create_dir()
H A Dkset.rs48 let r = Self { in new() localVariable
56 let r = Arc::new(r); in new() localVariable
59 let p = r.as_ref() as *const Self as *mut Self; in new()
60 (*p).self_ref = Arc::downgrade(&r); in new()
63 return r; in new()
/DragonOS/kernel/src/driver/input/serio/
H A Dmod.rs27 let r = bus_register(serio_bus.clone() as Arc<dyn Bus>); in serio_bus_init() localVariable
30 return r; in serio_bus_init()
/DragonOS/docs/
H A Dconf.py89 smv_released_pattern = r'^tags/.*$' # Tags only
90 smv_tag_whitelist = r'^(V.*|v.*)$'
/DragonOS/user/apps/user-manage/src/check/
H A Dcheck.rs106 let r = fs::read_to_string("/etc/group"); in check_group_gid() localVariable
108 match r { in check_group_gid()
163 let r = std::process::Command::new("/bin/groupadd") in check_group_gid() localVariable
168 if let Ok(exit_status) = r { in check_group_gid()
447 let r = fs::read_to_string("/etc/passwd"); in cur_username() localVariable
450 match r { in cur_username()
476 let r = fs::read_to_string("/etc/shadow"); in check_password() localVariable
477 match r { in check_password()
587 let r = fs::read_to_string("/etc/passwd"); in is_main_group() localVariable
588 match r { in is_main_group()
[all …]
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Dfbmem.rs88 let r = Self { in new() localVariable
91 let r = Arc::new(r); in new() localVariable
92 r.subsystem() in new()
93 .set_class(Some(Arc::downgrade(&r) as Weak<dyn Class>)); in new()
95 return r; in new()
218 let r = Arc::new(Self { in new() localVariable
233 let mut inner_guard = r.inner.lock(); in new()
235 inner_guard.devfs_metadata.raw_dev = r.do_device_number(&inner_guard); in new()
238 return r; in new()
/DragonOS/kernel/src/process/
H A Dexit.rs93 let r = do_wait(&mut kwo)?; in kernel_wait4() localVariable
105 return Ok(r); in kernel_wait4()
144 let r = do_waitpid(child_pcb, kwo); in do_wait() localVariable
145 if let Some(r) = r { in do_wait()
146 return r; in do_wait()
/DragonOS/kernel/src/time/
H A Dtimekeep.rs30 let r = time_spec.tv_sec * 1_000_000_000 + time_spec.tv_nsec; in ktime_get_real() localVariable
31 return Ok(r); in ktime_get_real()
/DragonOS/kernel/src/exception/
H A Dirqdomain.rs203 let r = domain.ops.map(domain, hwirq, irq); in domain_associate() localVariable
204 if let Err(e) = r { in domain_associate()
249 let mut r = Ok(()); in activate_irq() localVariable
255 r = self.do_activate_irq(Some(irq_data.clone()), reserve); in activate_irq()
258 if r.is_err() { in activate_irq()
262 return r; in activate_irq()
271 let mut r = Ok(()); in do_activate_irq() localVariable
279 r = self.do_activate_irq(Some(parent_data), reserve); in do_activate_irq()
282 if r.is_err() { in do_activate_irq()
293 return r; in do_activate_irq()
[all …]
/DragonOS/kernel/src/filesystem/sysfs/
H A Dfile.rs155 let r = parent.add_file( in add_file_with_mode() localVariable
163 if let Err(e) = r { in add_file_with_mode()
185 let r = parent.remove(attr.name()); in remove_file() localVariable
186 if unlikely(r.is_err()) { in remove_file()
221 let r = parent.remove(attr.name()); in remove_bin_file() localVariable
222 if unlikely(r.is_err()) { in remove_bin_file()
267 let r = parent.add_file( in add_bin_file_with_mode() localVariable
275 if let Err(e) = r { in add_bin_file_with_mode()

1234