Home
last modified time | relevance | path

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

123

/DragonOS-0.1.9/kernel/src/libs/intertrait/macros/src/
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()
Dargs.rs13 fn from(ident: &Ident) -> Result<Self> { in from() method
42 if !flags.insert(Flag::from(&ident)?) { in parse()
/DragonOS-0.1.9/kernel/src/libs/
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-0.1.9/kernel/src/libs/intertrait/src/
Dlib.rs180 pub cast_ref: fn(from: &dyn Any) -> &T,
184 pub cast_mut: fn(from: &mut dyn Any) -> &mut T,
188 pub cast_box: fn(from: Box<dyn Any>) -> Box<T>,
192 pub cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>,
196 pub cast_arc: fn(from: Arc<dyn Any + Sync + Send + 'static>) -> Arc<T>,
201 cast_ref: fn(from: &dyn Any) -> &T, in new()
202 cast_mut: fn(from: &mut dyn Any) -> &mut T, in new()
203 cast_box: fn(from: Box<dyn Any>) -> Box<T>, in new()
204 cast_rc: fn(from: Rc<dyn Any>) -> Rc<T>, in new()
216 cast_ref: fn(from: &dyn Any) -> &T, in new_sync()
[all …]
/DragonOS-0.1.9/build-scripts/kernel_build/src/cfiles/arch/
Dx86_64.rs45 files.push(PathBuf::from("src/arch/x86_64/asm/head.S")); in setup_files()
46 files.push(PathBuf::from("src/arch/x86_64/asm/entry.S")); in setup_files()
47 files.push(PathBuf::from("src/arch/x86_64/asm/apu_boot.S")); in setup_files()
57 PathBuf::from(format!("{}/{}", ARCH_DIR_X86_64, relative_path)) in arch_path()
Driscv64.rs20 files.push(PathBuf::from("src/arch/riscv64/asm/head.S")); in setup_files()
40 PathBuf::from(format!("{}/{}", ARCH_DIR_RISCV64, relative_path)) in arch_path()
/DragonOS-0.1.9/kernel/src/arch/x86_64/syscall/
Dmod.rs141 let path = String::from("/bin/shell.elf"); in rs_exec_init_process()
142 let argv = vec![String::from("/bin/shell.elf")]; in rs_exec_init_process()
143 let envp = vec![String::from("PATH=/bin")]; in rs_exec_init_process()
157 let high = (u32::from(sysret_base) << 16) | u32::from(syscall_base); in init_syscall_64()
159 x86::msr::wrmsr(x86::msr::IA32_STAR, u64::from(high) << 32); in init_syscall_64()
/DragonOS-0.1.9/kernel/src/init/
Dinitial_kthread.rs63 let path = String::from("/bin/dragonreach"); in switch_to_user()
64 let argv = vec![String::from("/bin/dragonreach")]; in switch_to_user()
65 let envp = vec![String::from("PATH=/")]; in switch_to_user()
/DragonOS-0.1.9/build-scripts/kernel_build/src/bindgen/
Dmod.rs13 let out_path = PathBuf::from(String::from("src/include/bindings/")); in generate_bindings()
/DragonOS-0.1.9/docs/kernel/core_api/
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-0.1.9/kernel/src/time/
Dmod.rs71 return Self::from(Duration::from_millis( in now()
94 fn from(dur: Duration) -> Self { in from() method
103 fn from(val: TimeSpec) -> Self { in from() method
388 fn from(other: ::core::time::Duration) -> Duration { in from() method
394 fn from(val: Duration) -> Self { in from() method
401 fn from(val: smoltcp::time::Instant) -> Self { in from() method
407 fn from(val: Instant) -> Self { in from() method
414 fn from(val: smoltcp::time::Duration) -> Self { in from() method
420 fn from(val: Duration) -> Self { in from() method
/DragonOS-0.1.9/kernel/src/filesystem/procfs/
Dsyscall.rs30 fn from(value: usize) -> Self { in from() method
62 let syslog_action = SyslogAction::from(syslog_action_type); in do_syslog()
/DragonOS-0.1.9/kernel/src/net/
Dmod.rs103 fn from(value: smoltcp::wire::IpProtocol) -> Self { in from() method
105 Protocol::from(x) in from()
110 fn from(value: u8) -> Self { in from() method
/DragonOS-0.1.9/kernel/src/exception/
Dsoftirq.rs77 fn from(value: u64) -> Self { in from() method
91 fn from(value: SoftirqNumber) -> Self { in from() method
180 cpu_pending(smp_get_processor_id()).set(VecStatus::from(softirq_num), false); in unregister_softirq()
252 cpu_pending(processor_id).insert(VecStatus::from(softirq_num)); in raise_softirq()
263 cpu_pending(smp_get_processor_id()).remove(VecStatus::from(softirq_num)); in clear_softirq_pending()
/DragonOS-0.1.9/kernel/src/filesystem/vfs/
Dutils.rs63 ret_path = String::from(path); in user_path_at()
71 ret_path = String::from(path); in user_path_at()
Dmod.rs441 (ROOT_INODE().clone(), String::from(rest)) in lookup_follow_symlink()
444 (self.find(".")?, String::from(path)) in lookup_follow_symlink()
460 name = String::from(&rest_path[0..pos]); in lookup_follow_symlink()
462 rest_path = String::from(&rest_path[pos + 1..]); in lookup_follow_symlink()
484 let link_path = String::from( in lookup_follow_symlink()
/DragonOS-0.1.9/kernel/src/filesystem/ramfs/
Dmod.rs290 raw_dev: DeviceNumber::from(data as u32), in create_with_data()
300 inode.children.insert(String::from(name), result.clone()); in create_with_data()
329 .insert(String::from(name), other_locked.self_ref.upgrade().unwrap()); in link()
426 return Ok(String::from(".")); in get_entry_name()
429 return Ok(String::from("..")); in get_entry_name()
468 keys.push(String::from(".")); in list()
469 keys.push(String::from("..")); in list()
535 .insert(String::from(filename).to_uppercase(), nod.clone()); in mknod()
/DragonOS-0.1.9/kernel/src/ipc/
Dsignal.rs37 if pid.lt(&Pid::from(0)) { in send_signal_info()
406 .remove(SigSet::from(Signal::SIGKILL.into()) | SigSet::from(Signal::SIGSTOP.into())); in do_sigaction()
433 new_set.remove(SigSet::from(Signal::SIGKILL.into()) | SigSet::from(Signal::SIGSTOP.into())); in set_current_sig_blocked()
/DragonOS-0.1.9/kernel/src/driver/acpi/
Dsysfs.rs252 let from = unsafe { in read() localVariable
258 if offset >= from.len() { in read()
262 if count > from.len() - offset { in read()
263 count = from.len() - offset; in read()
265 buf[0..count].copy_from_slice(&from[offset..offset + count]); in read()
/DragonOS-0.1.9/kernel/src/filesystem/devfs/
Dmod.rs263 raw_dev: DeviceNumber::from(data_ as u32), in new_with_parent()
353 raw_dev: DeviceNumber::from(data as u32), in do_create_with_data()
362 guard.children.insert(String::from(name), result.clone()); in do_create_with_data()
430 return Ok(String::from(".")); in get_entry_name()
433 return Ok(String::from("..")); in get_entry_name()
480 keys.push(String::from(".")); in list()
481 keys.push(String::from("..")); in list()
/DragonOS-0.1.9/docs/kernel/ipc/
Dsignal.md47 │ Return from syscall...│ │
/DragonOS-0.1.9/kernel/src/arch/x86_64/interrupt/
Dipi.rs34 fn from(kind: IpiKind) -> Self { in from() method
67 fn from(target: IpiTarget) -> Self { in from() method
129 let ipi_vec = ArchIpiKind::from(kind).into(); in send_ipi()
130 let target = ArchIpiTarget::from(target); in send_ipi()
/DragonOS-0.1.9/kernel/src/libs/intertrait/
DREADME.md3 We forked this lib from [intertrait](https://github.com/CodeChain-io/intertrait/) (revision d5d6dcb…
14 of the backing value) is possible (even no coercion from a trait object for a trait to that for its…
135 from an object for a sub-trait of [`CastFrom`].
138 …any::Any`] back to its concrete type and then creating a trait object for the target trait from it.
150 `intertrait` has taken much of its core ideas from the great [`traitcast`](https://github.com/bch29…
/DragonOS-0.1.9/kernel/src/arch/riscv64/ipc/
Dsignal.rs66 fn from(value: usize) -> Self { in from() method
84 fn from(value: i32) -> Self { in from() method
89 return Self::from(value as usize); in from()
/DragonOS-0.1.9/kernel/src/driver/keyboard/
Dps2_keyboard.rs182 let status = Ps2StatusRegister::from(status); in handle()
204 status = Ps2StatusRegister::from(unsafe { in wait_ps2_keyboard_write()
242 let status = Ps2StatusRegister::from(status); in ps2_keyboard_init()

123