/DragonOS/kernel/src/libs/ |
H A D | wait_queue.rs | 11 process::{ProcessControlBlock, ProcessManager, ProcessState}, 38 let pcb = ProcessManager::current_pcb(); in prepare_to_wait_event() 42 ProcessManager::mark_sleep(interruptible).unwrap_or_else(|e| { in prepare_to_wait_event() 45 guard.wait_list.push_back(ProcessManager::current_pcb()); in prepare_to_wait_event() 52 let pcb = ProcessManager::current_pcb(); in finish_wait() 68 ProcessManager::mark_sleep(true).unwrap_or_else(|e| { in sleep() 71 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep() 84 ProcessManager::mark_sleep(true).unwrap_or_else(|e| { in sleep_with_func() 88 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_with_func() 114 ProcessManager::mark_sleep(true).unwrap_or_else(|e| { in sleep_without_schedule() [all …]
|
H A D | spinlock.rs | 11 use crate::process::ProcessManager; 103 ProcessManager::preempt_disable(); in try_lock() 115 ProcessManager::preempt_enable(); in try_lock() 130 ProcessManager::preempt_disable(); in try_lock_irqsave() 139 ProcessManager::preempt_enable(); in try_lock_irqsave() 168 ProcessManager::preempt_enable(); in unlock()
|
H A D | mutex.rs | 13 process::{Pid, ProcessControlBlock, ProcessManager}, 68 if !self.check_pid_in_wait_list(&inner, ProcessManager::current_pcb().pid()) { in lock() 69 inner.wait_list.push_back(ProcessManager::current_pcb()); in lock() 108 ProcessManager::mark_sleep(true).ok(); in __sleep() 130 ProcessManager::wakeup(&to_wakeup).ok(); in unlock()
|
H A D | rwlock.rs | 15 process::ProcessManager, 121 ProcessManager::preempt_disable(); in try_read() 124 ProcessManager::preempt_enable(); in try_read() 210 ProcessManager::preempt_disable(); in try_write() 213 ProcessManager::preempt_enable(); in try_write() 223 ProcessManager::preempt_disable(); in try_write_irqsave() 230 ProcessManager::preempt_enable(); in try_write_irqsave() 287 ProcessManager::preempt_disable(); in try_upgradeable_read() 290 ProcessManager::preempt_enable(); in try_upgradeable_read() 299 ProcessManager::preempt_disable(); in try_upgradeable_read_irqsave() [all …]
|
/DragonOS/kernel/src/process/ |
H A D | c_adapter.rs | 3 use super::{process_init, ProcessManager, __PROCESS_MANAGEMENT_INIT_DONE}; 13 return ProcessManager::idle_pcb()[cpu_id as usize] in rs_get_idle_stack_top() 27 return ProcessManager::current_pcb().pid().0 as u32; in rs_current_pcb_pid() 37 return ProcessManager::current_pcb().preempt_count() as u32; in rs_current_pcb_preempt_count() 45 return ProcessManager::current_pcb().flags().bits() as u32; in rs_current_pcb_flags() 54 return ProcessManager::current_pcb().arch_info_irqsave().rbp() as u64; in rs_current_pcb_thread_rbp() 66 return ProcessManager::preempt_disable(); in rs_preempt_disable() 71 return ProcessManager::preempt_enable(); in rs_preempt_enable() 79 ProcessManager::exit(exit_code); in rs_process_do_exit()
|
H A D | stdio.rs | 9 process::{Pid, ProcessManager}, 14 if ProcessManager::current_pcb().pid() != Pid(1) { in stdio_init() 38 ProcessManager::current_pcb() in stdio_init() 46 ProcessManager::current_pcb() in stdio_init() 54 ProcessManager::current_pcb() in stdio_init()
|
H A D | utils.rs | 1 use crate::process::ProcessManager; 9 return *ProcessManager::current_pcb().flags(); in current_pcb_flags() 16 return ProcessManager::current_pcb().preempt_count(); in current_pcb_preempt_count()
|
H A D | syscall.rs | 19 KernelStack, Pid, ProcessManager, 87 ProcessManager::fork(frame, CloneFlags::empty()).map(|pid| pid.into()) in fork() 135 ProcessManager::current_pcb() in execve() 142 let fd_table = ProcessManager::current_pcb().fd_table(); in execve() 243 ProcessManager::exit(status); in exit() 248 let current_pcb = ProcessManager::current_pcb(); in getpid() 266 let current_pcb = ProcessManager::current_pcb(); in getpgid() 269 let target_proc = ProcessManager::find(pid).ok_or(SystemError::ESRCH)?; in getpgid() 276 let current_pcb = ProcessManager::current_pcb(); in getppid() 294 let current_pcb = ProcessManager::current_pcb(); in clone() [all …]
|
H A D | kthread.rs | 21 process::{ProcessManager, ProcessState}, 266 assert!(ProcessManager::current_pcb().pid() == Pid::new(0)); in init_stage1() 279 ProcessManager::current_pcb() in init_stage1() 293 ProcessManager::current_pcb() in init_stage1() 303 assert!(ProcessManager::current_pcb() in init_stage2() 319 let pcb = ProcessManager::find(kthreadd_pid).unwrap(); in init_stage2() 320 ProcessManager::wakeup(&pcb).expect("Failed to wakeup kthread daemon"); in init_stage2() 347 ProcessManager::wakeup(unsafe { KTHREAD_DAEMON_PCB.as_ref().unwrap() }) in create() 368 ProcessManager::wakeup(&pcb) in create_and_run() 402 ProcessManager::wakeup(pcb).ok(); in stop() [all …]
|
H A D | exit.rs | 18 abi::WaitOption, pid::PidType, resource::RUsage, Pid, ProcessControlBlock, ProcessManager, 79 pid = ProcessManager::current_pcb().pid().data() as i64; in kernel_wait4() 115 let child_pcb = ProcessManager::find(kwo.pid).ok_or(SystemError::ECHILD); in do_wait() 125 if !ProcessManager::current_pcb() in do_wait() 153 let current_pcb = ProcessManager::current_pcb(); in do_wait() 157 let pcb = ProcessManager::find(*pid).ok_or(SystemError::ECHILD)?; in do_wait() 162 unsafe { ProcessManager::release(*pid) }; in do_wait() 250 unsafe { ProcessManager::release(pid) }; in do_waitpid()
|
/DragonOS/kernel/src/arch/x86_64/interrupt/ |
H A D | trap.rs | 14 process::ProcessManager, 122 ProcessManager::current_pid() in do_divide_error() 136 ProcessManager::current_pid() in do_debug() 150 ProcessManager::current_pid() in do_nmi() 164 ProcessManager::current_pid() in do_int3() 178 ProcessManager::current_pid() in do_overflow() 192 ProcessManager::current_pid() in do_bounds() 206 ProcessManager::current_pid() in do_undefined_opcode() 220 ProcessManager::current_pid() in do_dev_not_avaliable() 234 ProcessManager::current_pid() in do_double_fault() [all …]
|
/DragonOS/kernel/src/arch/x86_64/process/ |
H A D | idle.rs | 8 process::{ProcessFlags, ProcessManager}, 12 impl ProcessManager { implementation 16 let pcb = ProcessManager::current_pcb(); in arch_idle_func()
|
H A D | kthread.rs | 12 Pid, ProcessManager, 43 let pid = ProcessManager::fork(&frame, clone_flags).inspect_err(|_e| { in __inner_create() 47 ProcessManager::find(pid) in __inner_create()
|
H A D | syscall.rs | 12 ProcessControlBlock, ProcessManager, 57 let pcb = ProcessManager::current_pcb(); in arch_prctl() 94 if pcb.pid() == ProcessManager::current_pcb().pid() { in do_arch_prctl_64() 100 if pcb.pid() == ProcessManager::current_pcb().pid() { in do_arch_prctl_64()
|
/DragonOS/kernel/src/ipc/ |
H A D | signal.rs | 11 process::{pid::PidType, Pid, ProcessControlBlock, ProcessFlags, ProcessManager}, 76 let pcb = ProcessManager::find(pid); in send_signal_info() 148 SigType::Kill(ProcessManager::current_pcb().pid()), in send_signal() 286 let _r = ProcessManager::wakeup_stop(&pcb); in prepare_sianal() 321 ProcessManager::wakeup(&pcb).unwrap_or_else(|e| { in signal_wake_up() 325 ProcessManager::current_pcb().pid(), in signal_wake_up() 331 ProcessManager::wakeup_stop(&pcb).unwrap_or_else(|e| { in signal_wake_up() 335 ProcessManager::current_pcb().pid(), in signal_wake_up() 345 ProcessManager::kick(&pcb); in signal_wake_up() 347 let _r = ProcessManager::wakeup(&pcb).map(|_| { in signal_wake_up() [all …]
|
/DragonOS/kernel/src/arch/x86_64/ipc/ |
H A D | signal.rs | 19 process::ProcessManager, 363 let pcb = ProcessManager::current_pcb(); in setup_sigcontext() 386 let guard = ProcessManager::current_pcb(); in restore_sigcontext() 418 let pcb = ProcessManager::current_pcb(); in do_signal() 497 ProcessManager::current_pcb().pid(), in do_signal() 509 let _r = Syscall::kill(ProcessManager::current_pcb().pid(), Signal::SIGSEGV as i32) in sys_rt_sigreturn() 518 let _r = Syscall::kill(ProcessManager::current_pcb().pid(), Signal::SIGSEGV as i32) in sys_rt_sigreturn() 586 ProcessManager::current_pcb().pid(), in setup_frame() 590 ProcessManager::current_pcb().pid(), in setup_frame() 601 ProcessManager::current_pcb().pid() in setup_frame() [all …]
|
/DragonOS/kernel/src/arch/riscv64/process/ |
H A D | idle.rs | 5 use crate::{arch::CurrentIrqArch, exception::InterruptArch, process::ProcessManager}; 7 impl ProcessManager { impl
|
/DragonOS/kernel/src/arch/riscv64/ipc/ |
H A D | signal.rs | 6 process::ProcessManager, 303 ProcessManager::exit(sig as usize); in sig_terminate() 308 ProcessManager::exit(sig as usize); in sig_terminate_dump() 315 ProcessManager::mark_stop().unwrap_or_else(|e| { in sig_stop() 319 ProcessManager::current_pcb(), in sig_stop() 330 ProcessManager::wakeup_stop(&ProcessManager::current_pcb()).unwrap_or_else(|_| { in sig_continue() 333 ProcessManager::current_pcb().pid(), in sig_continue()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | open.rs | 13 driver::base::block::SeekFrom, process::ProcessManager, 46 let (inode, path) = user_path_at(&ProcessManager::current_pcb(), dirfd, path)?; in do_faccessat() 59 let (inode, path) = user_path_at(&ProcessManager::current_pcb(), dirfd, path)?; in do_fchmodat() 83 let (inode, path) = user_path_at(&ProcessManager::current_pcb(), dirfd, path)?; in do_fchownat() 107 let cred = ProcessManager::current_pcb().cred(); in chown_common() 140 let fd_table = &ProcessManager::current_pcb().fd_table(); in ksys_fchown() 172 let (inode_begin, path) = user_path_at(&ProcessManager::current_pcb(), dirfd, path)?; in do_sys_openat2() 231 let r = ProcessManager::current_pcb() in do_sys_openat2() 258 user_path_at(&ProcessManager::current_pcb(), dirfd, path.as_str())?; 267 let binding = ProcessManager::current_pcb().fd_table(); [all …]
|
/DragonOS/kernel/src/driver/tty/ |
H A D | kthread.rs | 12 ProcessControlBlock, ProcessManager, 39 ProcessManager::mark_sleep(true).expect("TTY_REFRESH_THREAD can not mark sleep"); in tty_refresh_thread() 72 let _ = ProcessManager::wakeup(unsafe { TTY_REFRESH_THREAD.as_ref().unwrap() }); in send_to_tty_refresh_thread()
|
H A D | tty_job_control.rs | 7 process::{Pid, ProcessManager}, 23 let pcb = ProcessManager::current_pcb(); in proc_set_tty() 36 let pcb = ProcessManager::current_pcb(); in tty_check_change() 93 let current = ProcessManager::current_pcb(); in job_ctrl_ioctl() 111 let current = ProcessManager::current_pcb(); in job_ctrl_ioctl()
|
/DragonOS/kernel/src/time/ |
H A D | tick_common.rs | 3 process::ProcessManager, 24 ProcessManager::update_process_times(trap_frame.is_from_user()); in tick_periodic()
|
H A D | sleep.rs | 9 process::ProcessManager, 45 let handler: Box<WakeUpHelper> = WakeUpHelper::new(ProcessManager::current_pcb()); in nanosleep() 50 ProcessManager::mark_sleep(true).ok(); in nanosleep()
|
/DragonOS/kernel/src/smp/ |
H A D | init.rs | 6 process::ProcessManager, 22 ProcessManager::arch_idle_func(); in smp_ap_start_stage2()
|
/DragonOS/kernel/src/namespaces/ |
H A D | namespace.rs | 8 use crate::process::{Pid, ProcessControlBlock, ProcessManager}; 89 let current = ProcessManager::current_pid(); in unshare_nsproxy_namespaces() 90 let pcb = ProcessManager::find(current).unwrap(); in unshare_nsproxy_namespaces() 101 let current = ProcessManager::current_pcb(); in prepare_nsset() 111 let current = ProcessManager::current_pcb(); in commit_nsset()
|