/DragonOS-0.1.9/kernel/src/process/ |
D | fork.rs | 157 let current_pcb = ProcessManager::current_pcb(); in fork() localVariable 161 let name = current_pcb.basic().name().to_string(); in fork() 168 Self::copy_process(¤t_pcb, &pcb, args, current_trapframe).map_err(|e| { in fork() 171 current_pcb.pid(), in fork() 206 *new_pcb.flags.get_mut() = ProcessManager::current_pcb().flags().clone(); in copy_flags() 228 current_pcb: &Arc<ProcessControlBlock>, in copy_mm() 231 let old_address_space = current_pcb.basic().user_vm().unwrap_or_else(|| { in copy_mm() 234 current_pcb.pid() in copy_mm() 245 current_pcb.pid(), new_pcb.pid(), e in copy_mm() 255 current_pcb: &Arc<ProcessControlBlock>, in copy_files() [all …]
|
D | process.rs | 17 return ProcessManager::current_pcb().flags().clone(); in current_pcb_flags() 24 return ProcessManager::current_pcb().preempt_count(); in current_pcb_preempt_count() 29 if ProcessManager::current_pcb().pid() != Pid(1) { in stdio_init() 46 ProcessManager::current_pcb() in stdio_init() 54 ProcessManager::current_pcb() in stdio_init() 62 ProcessManager::current_pcb() in stdio_init()
|
D | syscall.rs | 82 ProcessManager::current_pcb() in execve() 89 let fd_table = ProcessManager::current_pcb().fd_table(); in execve() 147 let current_pcb = ProcessManager::current_pcb(); in getpid() localVariable 148 return Ok(current_pcb.tgid()); in getpid() 159 let current_pcb = ProcessManager::current_pcb(); in getpgid() localVariable 160 pid = current_pcb.pid(); in getpgid() 169 let current_pcb = ProcessManager::current_pcb(); in getppid() localVariable 170 return Ok(current_pcb.basic().ppid()); in getppid() 187 let current_pcb = ProcessManager::current_pcb(); in clone() localVariable 189 let name = current_pcb.basic().name().to_string(); in clone() [all …]
|
D | c_adapter.rs | 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()
|
D | kthread.rs | 258 assert!(ProcessManager::current_pcb().pid() == Pid::new(0)); in init_stage1() 271 ProcessManager::current_pcb() in init_stage1() 285 ProcessManager::current_pcb() in init_stage1() 295 assert!(ProcessManager::current_pcb() in init_stage2() 440 let current_pcb = ProcessManager::current_pcb(); in kthread_daemon() localVariable 441 kdebug!("kthread_daemon: pid: {:?}", current_pcb.pid()); in kthread_daemon() 444 let mut worker_private_guard = current_pcb.worker_private(); in kthread_daemon() 449 current_pcb.flags().insert(ProcessFlags::KTHREAD); in kthread_daemon() 450 drop(current_pcb); in kthread_daemon() 490 info.set_create_ok(ProcessManager::current_pcb()); in kernel_thread_bootstrap_stage2() [all …]
|
D | exit.rs | 77 pid = ProcessManager::current_pcb().pid().data() as i64; in kernel_wait4() 123 if ProcessManager::current_pcb() in do_wait() 152 let current_pcb = ProcessManager::current_pcb(); in do_wait() localVariable 153 let rd_childen = current_pcb.children.read(); in do_wait()
|
D | mod.rs | 135 pub fn current_pcb() -> Arc<ProcessControlBlock> { in current_pcb() method 153 return ProcessManager::current_pcb().pid(); in current_pid() 160 ProcessManager::current_pcb().preempt_disable(); in preempt_disable() 168 ProcessManager::current_pcb().preempt_enable(); in preempt_enable() 268 let pcb = ProcessManager::current_pcb(); in mark_sleep() 293 let pcb = ProcessManager::current_pcb(); in mark_stop() 306 let current = ProcessManager::current_pcb(); in exit_notify() 340 let pcb = ProcessManager::current_pcb(); in exit() 425 ProcessManager::current_pcb().preempt_disable(); in kick() 436 ProcessManager::current_pcb().preempt_enable(); in kick() [all …]
|
/DragonOS-0.1.9/kernel/src/sched/ |
D | syscall.rs | 26 let current_pcb = ProcessManager::current_pcb(); in sched() localVariable 28 if current_pcb.pid() != next_pcb.pid() { in sched() 30 unsafe { ProcessManager::switch_process(current_pcb, next_pcb) }; in sched()
|
D | rt.rs | 164 ProcessManager::current_pcb() in timer_update_jiffies() 174 ProcessManager::current_pcb() in sched() 188 <= ProcessManager::current_pcb().sched_info().priority() in sched() 193 sched_enqueue(ProcessManager::current_pcb(), false); in sched() 203 >= ProcessManager::current_pcb().sched_info().priority() in sched() 215 sched_enqueue(ProcessManager::current_pcb(), false); in sched()
|
D | cfs.rs | 173 ProcessManager::current_pcb() in timer_update_jiffies() 216 ProcessManager::current_pcb() in sched() 228 let state = ProcessManager::current_pcb() in sched() 233 || (ProcessManager::current_pcb().sched_info().virtual_runtime() in sched() 239 sched_enqueue(ProcessManager::current_pcb(), false); in sched() 262 ProcessManager::current_pcb().sched_info().priority(), in sched()
|
D | core.rs | 107 if ProcessManager::current_pcb().preempt_count() != 0 { in do_sched() 108 let binding = ProcessManager::current_pcb(); in do_sched() 209 let binding = ProcessManager::current_pcb(); in sched_update_jiffies()
|
/DragonOS-0.1.9/kernel/src/libs/ |
D | wait_queue.rs | 39 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep() 56 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_with_func() 85 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_without_schedule() 97 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_without_schedule_uninterruptible() 109 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_uninterruptible() 124 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_unlock_spinlock() 140 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_unlock_mutex() 156 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_uninterruptible_unlock_spinlock() 173 guard.wait_list.push_back(ProcessManager::current_pcb()); in sleep_uninterruptible_unlock_mutex() 263 let pcb = ProcessManager::current_pcb(); in before_sleep_check() [all …]
|
D | mutex.rs | 67 if self.check_pid_in_wait_list(&inner, ProcessManager::current_pcb().pid()) == false in lock() 69 inner.wait_list.push_back(ProcessManager::current_pcb()); in lock()
|
D | semaphore.rs | 56 ProcessManager::current_pcb().pid().into(), in up()
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/ipc/ |
D | signal.rs | 363 let pcb = ProcessManager::current_pcb(); in setup_sigcontext() 386 let guard = ProcessManager::current_pcb(); in restore_sigcontext() 417 let pcb = ProcessManager::current_pcb(); in do_signal() 433 let pcb = ProcessManager::current_pcb(); in do_signal() 494 ProcessManager::current_pcb().pid(), in do_signal() 506 let _r = Syscall::kill(ProcessManager::current_pcb().pid(), Signal::SIGSEGV as i32) in sys_rt_sigreturn() 515 let _r = Syscall::kill(ProcessManager::current_pcb().pid(), Signal::SIGSEGV as i32) in sys_rt_sigreturn() 583 ProcessManager::current_pcb().pid(), in setup_frame() 587 ProcessManager::current_pcb().pid(), in setup_frame() 598 ProcessManager::current_pcb().pid() in setup_frame() [all …]
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/process/ |
D | mod.rs | 317 current_pcb: &Arc<ProcessControlBlock>, in copy_thread() 349 let current_arch_guard = current_pcb.arch_info_irqsave(); in copy_thread() 416 ProcessManager::current_pcb().preempt_enable(); in switch_process() 417 ProcessManager::current_pcb().preempt_enable(); in switch_process() 542 let current_pcb = ProcessManager::current_pcb(); in arch_switch_to_user() localVariable 544 current_pcb.kernel_stack().stack_max_address().data() - core::mem::size_of::<TrapFrame>(), in arch_switch_to_user() 558 let mut arch_guard = current_pcb.arch_info_irqsave(); in arch_switch_to_user() 576 current_pcb.flags().remove(ProcessFlags::KTHREAD); in arch_switch_to_user() 577 current_pcb.worker_private().take(); in arch_switch_to_user() 585 pid = current_pcb.pid(), in arch_switch_to_user() [all …]
|
D | syscall.rs | 28 let pcb = ProcessManager::current_pcb(); in do_execve() 124 let pcb = ProcessManager::current_pcb(); in arch_prctl() 161 if pcb.pid() == ProcessManager::current_pcb().pid() { in do_arch_prctl_64() 167 if pcb.pid() == ProcessManager::current_pcb().pid() { in do_arch_prctl_64()
|
/DragonOS-0.1.9/kernel/src/driver/tty/ |
D | tty_job_control.rs | 20 let pcb = ProcessManager::current_pcb(); in proc_set_tty() 35 let pcb = ProcessManager::current_pcb(); in tty_check_change() 92 let current = ProcessManager::current_pcb(); in job_ctrl_ioctl() 110 let current = ProcessManager::current_pcb(); in job_ctrl_ioctl()
|
/DragonOS-0.1.9/kernel/src/filesystem/vfs/ |
D | syscall.rs | 275 let binding = ProcessManager::current_pcb().fd_table(); in close() 291 let binding = ProcessManager::current_pcb().fd_table(); in ioctl() 313 let binding = ProcessManager::current_pcb().fd_table(); in read() 335 let binding = ProcessManager::current_pcb().fd_table(); in write() 355 let binding = ProcessManager::current_pcb().fd_table(); in lseek() 374 let binding = ProcessManager::current_pcb().fd_table(); in pread() 396 let binding = ProcessManager::current_pcb().fd_table(); in pwrite() 433 let proc = ProcessManager::current_pcb(); in chdir() 487 let proc = ProcessManager::current_pcb(); in getcwd() 518 let binding = ProcessManager::current_pcb().fd_table(); in getdents() [all …]
|
D | open.rs | 43 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() 92 let (inode_begin, path) = user_path_at(&ProcessManager::current_pcb(), dirfd, path)?; in do_sys_openat2() 151 let r = ProcessManager::current_pcb() in do_sys_openat2()
|
/DragonOS-0.1.9/kernel/src/net/ |
D | syscall.rs | 54 let binding = ProcessManager::current_pcb().fd_table(); in socket() 86 let binding = ProcessManager::current_pcb().fd_table(); in socketpair() 115 let socket_inode: Arc<SocketInode> = ProcessManager::current_pcb() in setsockopt() 141 let binding: Arc<SocketInode> = ProcessManager::current_pcb() in getsockopt() 204 let socket: Arc<SocketInode> = ProcessManager::current_pcb() in connect() 222 let socket: Arc<SocketInode> = ProcessManager::current_pcb() in bind() 252 let socket: Arc<SocketInode> = ProcessManager::current_pcb() in sendto() 275 let socket: Arc<SocketInode> = ProcessManager::current_pcb() in recvfrom() 306 let socket: Arc<SocketInode> = ProcessManager::current_pcb() in recvmsg() 335 let socket: Arc<SocketInode> = ProcessManager::current_pcb() in listen() [all …]
|
/DragonOS-0.1.9/kernel/src/net/event_poll/ |
D | mod.rs | 199 let file = ProcessManager::current_pcb() in close() 249 let current_pcb = ProcessManager::current_pcb(); in do_create_epoll() localVariable 250 let fd_table = current_pcb.fd_table(); in do_create_epoll() 275 let current_pcb = ProcessManager::current_pcb(); in do_epoll_ctl() localVariable 276 let fd_table = current_pcb.fd_table(); in do_epoll_ctl() 391 let current_pcb = ProcessManager::current_pcb(); in do_epoll_wait() localVariable 392 let fd_table = current_pcb.fd_table(); in do_epoll_wait() 467 if current_pcb.sig_info_irqsave().sig_pending().signal().bits() != 0 { in do_epoll_wait() 476 let handle = WakeUpHelper::new(current_pcb.clone()); in do_epoll_wait()
|
/DragonOS-0.1.9/kernel/src/exception/ |
D | softirq.rs | 217 let prev_count: usize = ProcessManager::current_pcb().preempt_count(); in do_softirq() 220 if unlikely(prev_count != ProcessManager::current_pcb().preempt_count()) { in do_softirq() 225 ProcessManager::current_pcb().preempt_count() in do_softirq() 227 unsafe { ProcessManager::current_pcb().set_preempt_count(prev_count) }; in do_softirq()
|
/DragonOS-0.1.9/kernel/src/ipc/ |
D | signal.rs | 119 SigType::Kill(ProcessManager::current_pcb().pid()), in send_signal() 303 ProcessManager::current_pcb().pid(), in signal_wake_up() 313 ProcessManager::current_pcb().pid(), in signal_wake_up() 368 let pcb = ProcessManager::current_pcb(); in do_sigaction() 435 let pcb = ProcessManager::current_pcb(); in set_current_sig_blocked()
|
/DragonOS-0.1.9/kernel/src/arch/riscv64/ipc/ |
D | signal.rs | 318 ProcessManager::current_pcb(), in sig_stop() 329 ProcessManager::wakeup_stop(&ProcessManager::current_pcb()).unwrap_or_else(|_| { in sig_continue() 332 ProcessManager::current_pcb().pid(), in sig_continue()
|