Home
last modified time | relevance | path

Searched refs:from (Results 1 – 25 of 112) sorted by relevance

12345

/DragonOS/kernel/crates/intertrait/macros/src/
H A Dgen_caster.rs18 |from| from.downcast_ref::<#ty>().unwrap(), in generate_caster()
19 |from| from.downcast_mut::<#ty>().unwrap(), in generate_caster()
20 |from| from.downcast::<#ty>().unwrap(), in generate_caster()
21 |from| from.downcast::<#ty>().unwrap(), in generate_caster()
22 |from| from.downcast::<#ty>().unwrap() in generate_caster()
28 |from| from.downcast_ref::<#ty>().unwrap(), in generate_caster()
29 |from| from.downcast_mut::<#ty>().unwrap(), in generate_caster()
30 |from| from.downcast::<#ty>().unwrap(), in generate_caster()
31 |from| from.downcast::<#ty>().unwrap(), in generate_caster()
H A Dargs.rs13 fn from(ident: &Ident) -> Result<Self> { in from() method
42 if !flags.insert(Flag::from(&ident)?) { in parse()
/DragonOS/kernel/src/libs/
H A Dint_like.rs39 pub const fn from(x: $backing_type) -> Self {
45 Self::from(x)
74 Self::new($new_type_name::from(0))
78 $new_type_name::from(self.container.load(order))
90 $new_type_name::from(self.container.swap(val.into(), order))
104 Ok(result) => Ok($new_type_name::from(result)),
105 Err(result) => Err($new_type_name::from(result)),
122 Ok(result) => Ok($new_type_name::from(result)),
123 Err(result) => Err($new_type_name::from(result)),
132 $new_type_name::from(self.container.fetch_add(val.into(), order))
/DragonOS/kernel/crates/intertrait/src/
H A Dlib.rs181 pub cast_ref: fn(from: &dyn Any) -> &T,
185 pub cast_mut: fn(from: &mut dyn Any) -> &mut T,
189 pub cast_box: fn(from: Box<dyn Any>) -> Box<T>,
193 pub cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>,
197 pub cast_arc: fn(from: Arc<dyn Any + Sync + Send + 'static>) -> Arc<T>,
202 cast_ref: fn(from: &dyn Any) -> &T, in new()
203 cast_mut: fn(from: &mut dyn Any) -> &mut T, in new()
204 cast_box: fn(from: Box<dyn Any>) -> Box<T>, in new()
205 cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>, in new()
217 cast_ref: fn(from: &dyn Any) -> &T, in new_sync()
[all …]
/DragonOS/kernel/src/filesystem/vfs/
H A Dutils.rs66 ret_path = String::from(path); in user_path_at()
74 ret_path = String::from(path); in user_path_at()
120 fn from(value: String) -> Self { in from() method
121 Self(Arc::from(value)) in from()
126 fn from(value: &str) -> Self { in from() method
127 Self(Arc::from(String::from(value))) in from()
/DragonOS/build-scripts/kernel_build/src/cfiles/arch/
H A Dx86_64.rs31 files.insert(PathBuf::from("src/arch/x86_64/asm/head.S")); in setup_files()
32 files.insert(PathBuf::from("src/arch/x86_64/asm/entry.S")); in setup_files()
33 files.insert(PathBuf::from("src/arch/x86_64/asm/apu_boot.S")); in setup_files()
43 PathBuf::from(format!("{}/{}", ARCH_DIR_X86_64, relative_path)) in arch_path()
H A Driscv64.rs20 files.insert(PathBuf::from("src/arch/riscv64/asm/head.S")); in setup_files()
42 PathBuf::from(format!("{}/{}", ARCH_DIR_RISCV64, relative_path)) in arch_path()
/DragonOS/kernel/src/time/
H A Dmod.rs83 return Self::from(Duration::from_millis( in now_cpu_time()
111 fn from(dur: Duration) -> Self { in from() method
120 fn from(value: PosixTimeval) -> Self { in from() method
129 fn from(val: PosixTimeSpec) -> Self { in from() method
468 fn from(other: ::core::time::Duration) -> Duration { in from() method
474 fn from(val: Duration) -> Self { in from() method
481 fn from(val: smoltcp::time::Instant) -> Self { in from() method
487 fn from(val: Instant) -> Self { in from() method
494 fn from(val: smoltcp::time::Duration) -> Self { in from() method
500 fn from(val: Duration) -> Self { in from() method
/DragonOS/docs/kernel/core_api/
H A Dsoftirq.md151 .register_softirq(SoftirqNumber::from(softirq_num as u64), softirq_example)
155 softirq_vectors().raise_softirq(SoftirqNumber::from(softirq_num as u64));
158 softirq_vectors().clear_softirq_pending(SoftirqNumber::from(softirq_num as u64));
161 softirq_vectors().unregister_softirq(SoftirqNumber::from(softirq_num as u64));
/DragonOS/build-scripts/kernel_build/src/bindgen/
H A Dmod.rs13 let out_path = PathBuf::from(String::from("src/include/bindings/")); in generate_bindings()
/DragonOS/user/apps/user-manage/src/check/
H A Dinfo.rs19 fn from(info: UAddInfo) -> Self { in from() method
65 let mut passwd = String::from(""); in to_string_group()
73 let mut passwd = String::from("!"); in to_string_gshadow()
/DragonOS/kernel/src/net/
H A Dmod.rs105 fn from(value: smoltcp::wire::IpProtocol) -> Self { in from() method
107 Protocol::from(x) in from()
112 fn from(value: u8) -> Self { in from() method
130 fn from(value: Protocol) -> Self { in from() method
H A Dsyscall.rs43 let protocol = Protocol::from(protocol as u8); in socket()
72 let protocol = Protocol::from(protocol as u8); in socketpair()
281 let sockaddr_in = SockAddr::from(endpoint); in recvfrom()
315 let sockaddr_in = SockAddr::from(endpoint); in recvmsg()
433 let sockaddr_in = SockAddr::from(remote_endpoint); in do_accept()
466 let sockaddr_in = SockAddr::from(endpoint); in getsockname()
496 let sockaddr_in = SockAddr::from(endpoint); in getpeername()
579 let ip: wire::IpAddress = wire::IpAddress::from(wire::Ipv4Address::from_bytes( in to_endpoint()
679 fn from(value: Endpoint) -> Self { in from() method
821 fn from(value: PosixIpProtocol) -> Self { in from() method
[all …]
/DragonOS/kernel/src/arch/x86_64/interrupt/
H A Dipi.rs34 fn from(kind: IpiKind) -> Self { in from() method
44 fn from(value: ArchIpiKind) -> Self { in from() method
67 fn from(target: IpiTarget) -> Self { in from() method
80 fn from(val: ArchIpiTarget) -> Self { in from() method
113 fn from(val: ArchIpiTarget) -> Self { in from() method
127 let ipi_vec = ArchIpiKind::from(kind).into(); in send_ipi()
128 let target = ArchIpiTarget::from(target); in send_ipi()
/DragonOS/kernel/src/filesystem/procfs/
H A Dsyscall.rs28 fn from(value: usize) -> Self { in from() method
59 let syslog_action = SyslogAction::from(syslog_action_type); in do_syslog()
/DragonOS/kernel/src/process/
H A Dtimer.rs38 <Jiffies as From<Duration>>::from(Duration::from_secs(second)).timer_jiffies(); in new()
84 <Jiffies as From<Duration>>::from(Duration::from_secs(self.expired_second)) in remain()
86 let remain_second = Duration::from(Jiffies::new(end_jiffies - now_jiffies)); in remain()
/DragonOS/kernel/src/arch/riscv64/
H A Dcpu.rs106 pub fn restore(&mut self, from: &LocalContext) { in restore()
109 self.kernel_sp = from.kernel_sp; in restore()
110 self.user_sp = from.user_sp; in restore()
/DragonOS/
H A Dtriagebot.toml30 # Those labels are removed when PR author requests a review from an assignee
32 # Those labels are added when PR author requests a review from an assignee
42 "regression-from-stable-to-stable",
43 "regression-from-stable-to-beta",
44 "regression-from-stable-to-nightly",
/DragonOS/kernel/src/filesystem/ramfs/
H A Dmod.rs308 let name = DName::from(name); in create_with_data()
340 raw_dev: DeviceNumber::from(data as u32), in create_with_data()
360 let name = DName::from(name); in link()
399 let name = DName::from(name); in unlink()
413 let name = DName::from(name); in rmdir()
442 let new_name = DName::from(new_name); in move_to()
451 self_inode.children.remove(&DName::from(old_name)); in move_to()
495 let name = DName::from(name); in find()
513 return Ok(String::from(".")); in get_entry_name()
516 return Ok(String::from("..")); in get_entry_name()
[all …]
/DragonOS/kernel/src/filesystem/devfs/
H A Dmod.rs287 raw_dev: DeviceNumber::from(data_ as u32), in new_with_parent()
299 if guard.children.contains_key(&DName::from(name)) { in add_dir()
321 let name = DName::from(name); in add_dev()
335 .remove(&DName::from(name)) in remove()
353 let name = DName::from(name); in do_create_with_data()
378 raw_dev: DeviceNumber::from(data as u32), in do_create_with_data()
441 .get(&DName::from(name)) in find()
460 return Ok(String::from(".")); in get_entry_name()
463 return Ok(String::from("..")); in get_entry_name()
505 keys.push(String::from(".")); in list()
[all …]
/DragonOS/kernel/src/arch/x86_64/syscall/
H A Dmod.rs144 let high = (u32::from(sysret_base) << 16) | u32::from(syscall_base); in init_syscall_64()
146 x86::msr::wrmsr(x86::msr::IA32_STAR, u64::from(high) << 32); in init_syscall_64()
/DragonOS/user/apps/user-manage/src/parser/
H A Dcmd.rs39 fn from(s: String) -> Self { in from() method
58 fn from(option: CmdOption) -> Self { in from() method
/DragonOS/kernel/src/exception/
H A Dsoftirq.rs78 fn from(value: u64) -> Self { in from() method
92 fn from(value: SoftirqNumber) -> Self { in from() method
181 cpu_pending(smp_get_processor_id()).set(VecStatus::from(softirq_num), false); in unregister_softirq()
253 cpu_pending(processor_id).insert(VecStatus::from(softirq_num)); in raise_softirq()
264 cpu_pending(smp_get_processor_id()).remove(VecStatus::from(softirq_num)); in clear_softirq_pending()
/DragonOS/kernel/src/bpf/map/
H A Dutil.rs50 fn from(value: &bpf_attr) -> Self { in from() method
70 fn from(value: &bpf_attr) -> Self { in from() method
/DragonOS/kernel/src/libs/lib_ui/
H A Dtextui.rs162 fn from(value: LineId) -> Self { in from() method
167 fn from(value: LineId) -> Self { in from() method
172 fn from(value: LineId) -> Self { in from() method
223 fn from(val: LineIndex) -> Self { in from() method
228 fn from(value: LineIndex) -> Self { in from() method
233 fn from(value: LineIndex) -> Self { in from() method
258 fn from(value: u32) -> Self { in from() method
263 fn from(value: FontColor) -> Self { in from() method
268 fn from(value: FontColor) -> Self { in from() method
273 fn from(value: FontColor) -> Self { in from() method
[all …]

12345