Home
last modified time | relevance | path

Searched refs:core (Results 1 – 25 of 115) sorted by relevance

12345

/DragonOS-0.1.8/kernel/src/libs/
Dalign.rs4 use core::{alloc::GlobalAlloc, fmt::Debug, ptr::Unique};
21 const LAYOUT: core::alloc::Layout = {
29 let layout = core::alloc::Layout::from_size_align(
30 core::mem::size_of::<T>(),
31 max(ALIGN, core::mem::align_of::<T>()),
63 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt()
67 core::any::type_name::<T>(), in fmt()
68 core::mem::align_of::<T>(), in fmt()
70 core::mem::size_of::<T>() in fmt()
79 core::ptr::drop_in_place(self.inner.as_ptr()); in drop()
[all …]
Dvolatile.rs3 unsafe { core::ptr::read_volatile(core::ptr::addr_of!($data)) }
9 unsafe { core::ptr::write_volatile(core::ptr::addr_of_mut!($data), $value) }
21 true => core::ptr::read_volatile(core::ptr::addr_of!($data)) | $val,
22 false => core::ptr::read_volatile(core::ptr::addr_of!($data)) & (!$val),
150 VolatileReadable::vread(core::ptr::addr_of!((*$nonnull.as_ptr()).$field))
169 VolatileWritable::vwrite(core::ptr::addr_of_mut!((*$nonnull.as_ptr()).$field), $value)
Dint_like.rs66 pub fn load(&self, order: ::core::sync::atomic::Ordering) -> $new_type_name {
70 pub fn store(&self, val: $new_type_name, order: ::core::sync::atomic::Ordering) {
77 order: ::core::sync::atomic::Ordering,
86 success: ::core::sync::atomic::Ordering,
87 failure: ::core::sync::atomic::Ordering,
88 ) -> ::core::result::Result<$new_type_name, $new_type_name> {
102 success: ::core::sync::atomic::Ordering,
103 failure: ::core::sync::atomic::Ordering,
104 ) -> ::core::result::Result<$new_type_name, $new_type_name> {
121 use ::core::sync::atomic::AtomicUsize; in test()
[all …]
Dlazy_init.rs19 use core::cell::UnsafeCell;
20 use core::fmt::Debug;
21 use core::mem::MaybeUninit;
22 use core::ops::{Deref, DerefMut};
23 use core::sync::atomic::{AtomicBool, Ordering};
137 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { in fmt()
Dffi_convert.rs10 return unsafe { core::mem::transmute::<*mut S, *mut D>(src).as_mut() }; in __convert_mut()
14 return unsafe { core::mem::transmute::<*const S, *const D>(src).as_ref() }; in __convert_ref()
Dspinlock.rs2 use core::cell::UnsafeCell;
3 use core::mem::ManuallyDrop;
4 use core::ops::{Deref, DerefMut};
5 use core::ptr::read_volatile;
7 use core::sync::atomic::{AtomicBool, Ordering};
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dmod.rs26 use core::sync::atomic::compiler_fence;
53 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
61 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
70 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
79 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
83 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
90 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
111 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
125 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
158 compiler_fence(core::sync::atomic::Ordering::SeqCst); in ahci_rust_init()
[all …]
Dahcidisk.rs21 use core::fmt::Debug;
22 use core::sync::atomic::compiler_fence;
23 use core::{mem::size_of, ptr::write_bytes};
42 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt()
59 compiler_fence(core::sync::atomic::Ordering::SeqCst); in read_at()
207 compiler_fence(core::sync::atomic::Ordering::SeqCst); in read_at()
218 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
237 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
247 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
259 compiler_fence(core::sync::atomic::Ordering::SeqCst); in write_at()
[all …]
/DragonOS-0.1.8/kernel/src/sched/
Dcfs.rs1 use core::{ptr::null_mut, sync::atomic::compiler_fence};
12 smp::core::smp_get_processor_id,
15 use super::core::{sched_enqueue, Scheduler};
192 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
197 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
201 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
204 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
210 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
217 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
223 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched()
[all …]
Dcore.rs1 use core::sync::atomic::compiler_fence;
76 compiler_fence(core::sync::atomic::Ordering::SeqCst); in do_sched()
79 compiler_fence(core::sync::atomic::Ordering::SeqCst); in do_sched()
104 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched_enqueue()
117 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched_enqueue()
125 compiler_fence(core::sync::atomic::Ordering::SeqCst); in sched_enqueue()
Dmod.rs2 pub mod core; module
/DragonOS-0.1.8/kernel/src/arch/x86_64/asm/
Dcurrent.rs3 use core::{arch::asm, sync::atomic::compiler_fence};
12 compiler_fence(core::sync::atomic::Ordering::SeqCst); in current_pcb()
14 compiler_fence(core::sync::atomic::Ordering::SeqCst); in current_pcb()
/DragonOS-0.1.8/kernel/src/mm/
Dpercpu.rs1 use core::sync::atomic::AtomicUsize;
7 smp::core::smp_get_processor_id,
28 if CPU_NUM.load(core::sync::atomic::Ordering::SeqCst) != 0 { in init()
33 CPU_NUM.store(cpus, core::sync::atomic::Ordering::SeqCst); in init()
60 let cpu_num = CPU_NUM.load(core::sync::atomic::Ordering::SeqCst); in new()
Dmod.rs9 use core::{
118 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt()
123 impl core::ops::Add<usize> for PhysAddr {
132 impl core::ops::AddAssign<usize> for PhysAddr {
139 impl core::ops::Add<PhysAddr> for PhysAddr {
148 impl core::ops::AddAssign<PhysAddr> for PhysAddr {
155 impl core::ops::Sub<usize> for PhysAddr {
164 impl core::ops::SubAssign<usize> for PhysAddr {
171 impl core::ops::Sub<PhysAddr> for PhysAddr {
180 impl core::ops::SubAssign<PhysAddr> for PhysAddr {
[all …]
/DragonOS-0.1.8/kernel/src/arch/x86_64/
Dcontext.rs3 use core::sync::atomic::compiler_fence;
18 compiler_fence(core::sync::atomic::Ordering::SeqCst); in switch_process()
30 compiler_fence(core::sync::atomic::Ordering::SeqCst); in switch_process()
Drand.rs1 use core::arch::x86_64::_rdtsc;
/DragonOS-0.1.8/kernel/src/process/
Dfork.rs1 use core::{ffi::c_void, ptr::null_mut, sync::atomic::compiler_fence};
50 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
56 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
65 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
68 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
72 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
75 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
77 compiler_fence(core::sync::atomic::Ordering::SeqCst); in process_copy_sighand()
/DragonOS-0.1.8/kernel/src/driver/
Dmod.rs13 use core::fmt::Debug;
15 fn as_any_ref(&'static self) -> &'static dyn core::any::Any; in as_any_ref()
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dkernel_allocator.rs7 use core::{
39 core::slice::from_raw_parts_mut( in alloc_in_buddy()
62 .unwrap_or(core::ptr::null_mut() as *mut u8); in local_alloc()
70 core::ptr::write_bytes(ptr, 0, x.len()); in local_alloc_zeroed()
73 .unwrap_or(core::ptr::null_mut() as *mut u8); in local_alloc_zeroed()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dutils.rs5 let mut path_split: core::str::SplitN<&str> = path.trim_matches('/').splitn(2, "/"); in split_path()
16 let mut path_split: core::str::RSplitN<&str> = path.trim_matches('/').rsplitn(2, "/"); in rsplit_path()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dtty_device.rs30 core: TtyCore, field
49 core: TtyCore::new(), in new()
54 result.core.enable_echo(); in new()
87 let r: Result<usize, TtyError> = self.core.input(buf, false); in input()
159 let r: Result<usize, TtyError> = self.core.read_stdin(&mut buf[0..len], true); in read_at()
195 self.core.stdout(&buf[0..len], true) in write_at()
197 self.core.stderr(&buf[0..len], true) in write_at()
220 fn as_any_ref(&self) -> &dyn core::any::Any { in as_any_ref()
242 let r: Result<usize, TtyError> = self.core.output(&mut buf[0..511], false); in sync()
299 tty.core.disable_echo(); in tty_init()
/DragonOS-0.1.8/kernel/src/ipc/
Dsignal_types.rs4 use core::ffi::c_void;
5 use core::fmt::Debug;
62 pub _sa_sigaction: ::core::option::Option<
64 sig: ::core::ffi::c_int,
66 arg1: *mut ::core::ffi::c_void,
71 impl core::fmt::Debug for sigaction__union_u {
72 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt()
142 pub sa_handler: *mut core::ffi::c_void,
143 pub sa_sigaction: *mut core::ffi::c_void,
146 pub sa_restorer: *mut core::ffi::c_void,
[all …]
Dsyscall.rs1 use core::{
66 compiler_fence(core::sync::atomic::Ordering::SeqCst); in kill()
70 compiler_fence(core::sync::atomic::Ordering::SeqCst); in kill()
101 core::mem::size_of::<sigaction>() as u64, in sigaction()
177 core::mem::size_of::<sigaction>() as u64, in sigaction()
/DragonOS-0.1.8/kernel/src/syscall/
Duser_access.rs2 use core::mem::size_of;
46 let src: &[u8] = core::slice::from_raw_parts(src.data() as *const u8, dst.len()); in copy_from_user()
123 let mut dst = core::mem::transmute::<[usize; 1], [u8; size_of::<usize>()]>(dst); in check_and_clone_cstr_array()
125 let dst = core::mem::transmute::<[u8; size_of::<usize>()], [usize; 1]>(dst); in check_and_clone_cstr_array()
/DragonOS-0.1.8/docs/kernel/sched/
Dindex.rst12 core

12345