Home
last modified time | relevance | path

Searched refs:u64 (Results 1 – 25 of 56) sorted by relevance

123

/DragonOS-0.1.8/kernel/src/arch/x86_64/asm/
Dcmpxchg.rs3 fn __try_cmpxchg_q(ptr: *mut u64, old_ptr: *mut u64, new_ptr: *mut u64) -> bool; in __try_cmpxchg_q() argument
9 pub unsafe fn try_cmpxchg_q(ptr: *mut u64, old_ptr: *mut u64, new_ptr: *mut u64) -> bool { in try_cmpxchg_q() argument
/DragonOS-0.1.8/kernel/src/io/
Ddisk_info.rs6 pub type SectorT = u64;
8 pub const BLK_TYPE_AHCI: u64 = 0;
16 pub lba_start: u64, // 起始LBA号
17 pub sectors_num: u64, // 该分区的扇区数
30 lba_start: u64, in new() argument
31 sectors_num: u64, in new() argument
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dfs.rs34 pub const MAX_FILE_SIZE: u64 = 0xffff_ffff;
40 pub cluster_num: u64,
41 pub parent_cluster: u64,
67 pub first_data_sector: u64,
225 offset: Option<u64>,
258 let fs_info_in_disk_bytes_offset = partition.lba_start * LBA_SIZE as u64 in new()
259 + bpb32.fs_info as u64 * bpb.bytes_per_sector as u64; in new()
270 let root_dir_sectors: u64 = ((bpb.root_entries_cnt as u64 * 32) in new()
271 + (bpb.bytes_per_sector as u64 - 1)) in new()
272 / (bpb.bytes_per_sector as u64); in new()
[all …]
Dentry.rs58 pub loc: ((Cluster, u64), (Cluster, u64)),
64 pub fn size(&self) -> u64 { in size() argument
65 return self.short_dir_entry.file_size as u64; in size()
85 offset: u64, in read() argument
92 let start_cluster_number: u64 = offset / fs.bytes_per_cluster(); in read()
102 let bytes_remain: u64 = self.size() - offset; in read()
105 let mut in_cluster_offset: u64 = offset % fs.bytes_per_cluster(); in read()
142 in_cluster_offset += r as u64; in read()
162 offset: u64, in write() argument
164 self.ensure_len(fs, offset, buf.len() as u64)?; in write()
[all …]
/DragonOS-0.1.8/kernel/src/time/
Dtimer.rs72 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self> { in new()
131 pub expire_jiffies: u64,
222 pub fn next_n_ms_timer_jiffies(expire_ms: u64) -> u64 { in next_n_ms_timer_jiffies() argument
226 pub fn next_n_us_timer_jiffies(expire_us: u64) -> u64 { in next_n_us_timer_jiffies() argument
250 let timer = Timer::new(WakeUpHelper::new(current_pcb()), timeout as u64); in schedule_timeout()
252 current_pcb().state &= (!PROC_RUNNING) as u64; in schedule_timeout()
267 pub fn timer_get_first_expire() -> Result<u64, SystemError> { in timer_get_first_expire()
289 pub fn update_timer_jiffies(add_jiffies: u64) -> u64 { in update_timer_jiffies() argument
298 pub fn clock() -> u64 { in clock()
303 pub extern "C" fn rs_clock() -> u64 { in rs_clock()
[all …]
Dmod.rs37 pub const FSEC_PER_SEC: u64 = 1000000000000000;
189 micros: u64,
195 pub const fn from_micros(micros: u64) -> Duration { in from_micros()
200 pub const fn from_millis(millis: u64) -> Duration { in from_millis()
207 pub const fn from_secs(secs: u64) -> Duration { in from_secs()
214 pub const fn millis(&self) -> u64 { in millis() argument
219 pub const fn micros(&self) -> u64 { in micros() argument
224 pub const fn secs(&self) -> u64 { in secs() argument
229 pub const fn total_millis(&self) -> u64 { in total_millis() argument
234 pub const fn total_micros(&self) -> u64 { in total_micros() argument
[all …]
Dtimekeeping.rs19 pub const NTP_INTERVAL_FREQ: u64 = HZ;
21 pub const NTP_INTERVAL_LENGTH: u64 = NSEC_PER_SEC as u64 / NTP_INTERVAL_FREQ;
47 xtime_interval: u64,
53 xtime_nsec: u64,
116 temp += (clock_data.mult / 2) as u64; in timekeeper_setup_internals()
120 timekeeper.xtime_interval = temp * clock_data.mult as u64; in timekeeper_setup_internals()
135 pub fn tk_get_ns(&self) -> u64 { in tk_get_ns() argument
240 let _stack_use = align_up(rsp as u64, 32768) - rsp as u64; in update_wall_time()
Dsleep.rs31 let expired_tsc: u64 = in nanosleep()
32 unsafe { _rdtsc() + (sleep_time.tv_nsec as u64 * Cpu_tsc_freq) / 1000000000 }; in nanosleep()
45 next_n_us_timer_jiffies((sleep_time.tv_nsec / 1000) as u64), in nanosleep()
Dclocksource.rs43 pub const HZ: u64 = 1000;
45 pub const WATCHDOG_INTERVAL: u64 = HZ >> 1;
52 pub struct CycleNum(pub u64);
57 pub fn new(cycle: u64) -> Self { in new()
61 pub fn data(&self) -> u64 { in data() argument
78 pub struct ClocksourceMask: u64 {
82 pub struct ClocksourceFlags: u64 {
95 impl From<u64> for ClocksourceMask {
96 fn from(value: u64) -> Self { in from()
100 return Self::from_bits_truncate(u64::MAX); in from()
[all …]
/DragonOS-0.1.8/kernel/src/arch/x86_64/
Dsyscall.rs24 fn do_fork(regs: *mut pt_regs, clone_flags: u64, stack_start: u64, stack_size: u64) -> u64; in do_fork() argument
32 $regs.rax = ret as u64;
63 (CLONE_VM | CLONE_FS | CLONE_SIGNAL) as u64, in syscall_handler()
81 syscall_return!(SystemError::EFAULT.to_posix_errno() as u64, regs); in syscall_handler()
116 syscall_return!(Syscall::handle(syscall_num, &args, from_user) as u64, regs); in syscall_handler()
241 regs.rdi = param.init_info().args.len() as u64; in tmp_rs_execve()
242 regs.rsi = argv_ptr.data() as u64; in tmp_rs_execve()
246 regs.rsp = user_sp.data() as u64; in tmp_rs_execve()
247 regs.rbp = user_sp.data() as u64; in tmp_rs_execve()
248 regs.rip = load_result.entry_point().data() as u64; in tmp_rs_execve()
[all …]
Dfpu.rs25 word2: u64,
27 word3: u64,
31 mm: [u64; 16],
33 xmm: [u64; 32],
35 rest: [u64; 12],
/DragonOS-0.1.8/kernel/src/ipc/
Dsignal_types.rs22 pub type sigset_t = u64;
24 pub type __signalfn_t = u64;
27 pub type __sigrestorer_fn_t = u64;
35 pub const STACK_ALIGN: u64 = 16;
80 _sa_handler: NULL as u64, in default()
86 pub const SA_FLAG_DFL: u64 = 1u64 << 0; // 当前sigaction表示系统默认的动作
87 pub const SA_FLAG_IGN: u64 = 1u64 << 1; // 当前sigaction表示忽略信号的动作
88 pub const SA_FLAG_RESTORER: u64 = 1u64 << 2; // 当前sigaction具有用户指定的restorer
89 pub const SA_FLAG_IMMUTABLE: u64 = 1u64 << 3; // 当前sigaction不可被更改
92 pub const SA_ALL_FLAGS: u64 = SA_FLAG_IGN | SA_FLAG_DFL | SA_FLAG_RESTORER | SA_FLAG_IMMUTABLE;
[all …]
Dsyscall.rs100 act as usize as u64, in sigaction()
101 core::mem::size_of::<sigaction>() as u64, in sigaction()
107 let _input_sah = unsafe { (*act).sa_handler as u64 }; in sigaction()
124 new_ka.sa_restorer = sar as u64; in sigaction()
130 _sa_handler: unsafe { (*act).sa_handler as u64 }, in sigaction()
134 sa_restorer: unsafe { (*act).sa_restorer as u64 }, in sigaction()
140 if new_ka.sa_restorer != NULL as u64 { in sigaction()
176 old_act as usize as u64, in sigaction()
177 core::mem::size_of::<sigaction>() as u64, in sigaction()
183 let sah: u64; in sigaction()
Dsignal.rs45 _sa_handler: NULL as u64,
49 sa_restorer: NULL as u64,
56 _sa_handler: NULL as u64,
60 sa_restorer: NULL as u64,
232 if sig == SignalNumber::SIGKILL || (pcb.flags & (PF_KTHREAD as u64)) != 0 { in __send_signal_locked()
317 if (pcb.flags & (PF_EXITING as u64)) > 0 { in wants_signal()
370 let mut state: u64 = 0; in signal_wake_up()
372 state = PF_WAKEKILL as u64; in signal_wake_up()
377 fn signal_wake_up_state(pcb: &mut process_control_block, state: u64) { in signal_wake_up_state() argument
382 if !process_wake_up_state(pcb, state | (PROC_INTERRUPTIBLE as u64)) { in signal_wake_up_state()
[all …]
/DragonOS-0.1.8/kernel/src/libs/
Dwait_queue.rs46 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep()
59 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_with_func()
84 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_without_schedule()
91 current_pcb().state = PROC_UNINTERRUPTIBLE as u64; in sleep_uninterruptible()
101 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_unlock_spinlock()
112 current_pcb().state = PROC_INTERRUPTIBLE as u64; in sleep_unlock_mutex()
123 current_pcb().state = PROC_UNINTERRUPTIBLE as u64; in sleep_uninterruptible_unlock_spinlock()
134 current_pcb().state = PROC_UNINTERRUPTIBLE as u64; in sleep_uninterruptible_unlock_mutex()
148 pub fn wakeup(&self, state: u64) -> bool { in wakeup()
170 pub fn wakeup_all(&self, state: u64) { in wakeup_all() argument
Dnotifier.rs12 fn notifier_call(&self, action: u64, data: Option<&T>) -> i32; in notifier_call() argument
80 action: u64, in call_chain() argument
126 action: u64, in call_chain() argument
164 action: u64, in call_chain() argument
191 action: u64, in call_chain() argument
/DragonOS-0.1.8/docs/kernel/sched/
Dkernel_timer.md32 pub fn new(timer_func: Box<dyn TimerFunction>, expire_jiffies: u64) -> Arc<Self>
77 pub fn timer_get_first_expire() -> Result<u64, SystemError>
92 pub fn clock() -> u64
104 pub fn next_n_ms_timer_jiffies(expire_ms: u64) -> u64
122 pub fn next_n_us_timer_jiffies(expire_us: u64) -> u64
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dhba.rs48 pub clb: u64, // 0x00, command list base address, 1K-byte aligned
49 pub fb: u64, // 0x08, FIS base address, 256-byte aligned
90 pub dba: u64, // Data base address
122 pub ctba: u64, // Command table descriptor base address
192 pub fn init(&mut self, clb: u64, fb: u64, ctbas: &Vec<u64>) { in init() argument
204 ptr::write_bytes(phys_2_virt(clb as usize) as *mut u64, 0, 1024); in init()
213 ptr::write_bytes(phys_2_virt(fb as usize) as *mut u64, 0, 256); in init()
219 let mut cmdheaders = phys_2_virt(clb as usize) as *mut u64 as *mut HbaCmdHeader; in init()
226 ptr::write_bytes(phys_2_virt(ctbas[i] as usize) as *mut u64, 0, 256); in init()
395 …pub dma_buffer_id: u64, /* DMA Buffer Identifier. Used to Identify DMA buffer in host memory. SATA…
/DragonOS-0.1.8/kernel/src/process/
Dprocess.rs32 let state: u64 = unsafe { read_volatile(&(*pcb).state) } as u64; in process_is_stopped()
33 if (state & (PROC_STOPPED as u64)) != 0 { in process_is_stopped()
51 _state: u64, in process_try_to_wake_up() argument
63 write_volatile(&mut pcb.state, PROC_RUNNING as u64); in process_try_to_wake_up()
75 write_volatile(&mut pcb.state, PROC_RUNNING as u64); in process_try_to_wake_up()
91 pub extern "C" fn process_wake_up_state(pcb: *mut process_control_block, state: u64) -> bool { in process_wake_up_state()
143 clone_flags: u64, in copy_files() argument
147 if clone_flags & CLONE_FS as u64 != 0 { in copy_files()
287 self.state = PROC_INTERRUPTIBLE as u64; in mark_sleep_interruptible()
296 self.state = PROC_UNINTERRUPTIBLE as u64; in mark_sleep_uninterruptible()
Dfork.rs24 pub extern "C" fn process_copy_sighand(clone_flags: u64, pcb: *mut process_control_block) -> i32 { in process_copy_sighand() argument
27 if (clone_flags & (CLONE_SIGHAND as u64)) != 0 { in process_copy_sighand()
71 if (clone_flags & (CLONE_CLEAR_SIGHAND as u64)) != 0 { in process_copy_sighand()
83 pub extern "C" fn process_copy_signal(clone_flags: u64, pcb: *mut process_control_block) -> i32 { in process_copy_signal() argument
86 if (clone_flags & (CLONE_THREAD as u64)) != 0 { in process_copy_signal()
/DragonOS-0.1.8/kernel/src/sched/
Dcore.rs59 if (min_loads_cpu_id != pcb.cpu_id) && (pcb.flags & (PF_NEED_MIGRATE as u64)) == 0 { in loads_balance()
61 pcb.flags |= PF_NEED_MIGRATE as u64; in loads_balance()
107 if pcb.state & (PROC_RUNNING as u64) == 0 { in sched_enqueue()
119 if (pcb.flags & (PF_NEED_MIGRATE as u64)) != 0 { in sched_enqueue()
121 pcb.flags &= !(PF_NEED_MIGRATE as u64); in sched_enqueue()
191 pcb.flags |= PF_NEED_MIGRATE as u64; in sched_migrate_process()
/DragonOS-0.1.8/kernel/src/exception/
Dsoftirq.rs27 const MAX_SOFTIRQ_NUM: u64 = 64;
76 impl From<u64> for SoftirqNumber {
77 fn from(value: u64) -> Self { in from()
84 pub struct VecStatus: u64 {
92 return Self::from_bits_truncate(1 << (value as u64)); in from()
248 softirq_vectors().raise_softirq(SoftirqNumber::from(softirq_num as u64)); in rs_raise_softirq()
253 softirq_vectors().unregister_softirq(SoftirqNumber::from(softirq_num as u64)); in rs_unregister_softirq()
264 softirq_vectors().clear_softirq_pending(SoftirqNumber::from(softirq_num as u64)); in rs_clear_softirq_pending()
/DragonOS-0.1.8/kernel/src/arch/x86_64/interrupt/
Dipi.rs4 pub fn apic_write_icr(value: u64); in apic_write_icr() argument
108 apic_write_icr(((icr.upper() as u64) << 32) | icr.lower() as u64); in send_ipi()
124 apic_write_icr(((icr.upper() as u64) << 32) | icr.lower() as u64); in send_ipi()
/DragonOS-0.1.8/kernel/src/mm/
Dsyscall.rs21 pub struct ProtFlags: u64 {
29 pub struct MapFlags: u64 {
126 let map_flags = MapFlags::from_bits_truncate(map_flags as u64); in mmap()
127 let prot_flags = ProtFlags::from_bits_truncate(prot_flags as u64); in mmap()
214 let prot_flags = ProtFlags::from_bits(prot_flags as u64).ok_or(SystemError::EINVAL)?; in mprotect()
/DragonOS-0.1.8/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));

123