/DragonOS-0.1.8/docs/kernel/process_management/ |
D | pcb.md | 11 ### 根据pid寻找pcb 15 该API提供了根据pid寻找pcb的功能,定义在`kernel/src/process/process.h`中。 21 **pid**
|
/DragonOS-0.1.8/user/apps/shell/ |
D | cmd_test.c | 14 pid_t pid; in shell_pipe_test() local 21 pid = fork(); // 创建一个子进程 in shell_pipe_test() 22 if (pid < 0) in shell_pipe_test() 27 if (pid == 0) in shell_pipe_test()
|
/DragonOS-0.1.8/kernel/src/libs/sys/ |
D | wait.c | 12 pid_t waitpid(pid_t pid, int *stat_loc, int options) in waitpid() argument 14 …return (pid_t)enter_syscall_int(SYS_WAIT4, (uint64_t)pid, (uint64_t)stat_loc, options, 0, 0, 0, 0,… in waitpid()
|
/DragonOS-0.1.8/kernel/src/process/ |
D | syscall.rs | 10 fn c_sys_wait4(pid: pid_t, wstatus: *mut c_int, options: c_int, rusage: *mut c_void) -> c_int; in c_sys_wait4() 37 pid: pid_t, in wait4() 42 let ret = unsafe { c_sys_wait4(pid, wstatus, options, rusage) }; in wait4() 63 return Ok(current_pcb().pid as usize); in getpid()
|
D | process.c | 58 ….thread = &initial_thread, .addr_limit = 0xffffffffffffffff, .pid = 0, .priority = 2, … 366 struct process_control_block *process_find_pcb_by_pid(pid_t pid) in process_find_pcb_by_pid() argument 374 if (pcb->pid == pid) in process_find_pcb_by_pid() 464 rs_procfs_unregister_pid(pcb->pid); in process_release_pcb()
|
D | mod.rs | 19 pub mod pid; module
|
D | fork.c | 80 tsk->pid = process_global_pid++; in do_fork() 135 retval = tsk->pid; in do_fork() 140 rs_procfs_register_pid(tsk->pid); in do_fork() 153 rs_procfs_unregister_pid(tsk->pid); in do_fork()
|
D | kthread.c | 194 pid_t pid = kernel_thread(kthread, create, CLONE_FS | CLONE_SIGNAL); in __create_kthread() local 196 if (IS_ERR((void *)pid)) in __create_kthread() 200 create->result = (struct process_control_block *)pid; in __create_kthread()
|
/DragonOS-0.1.8/user/libs/libc/src/sys/ |
D | wait.c | 23 pid_t waitpid(pid_t pid, int *stat_loc, int options) in waitpid() argument 25 …return (pid_t)syscall_invoke(SYS_WAIT4, (uint64_t)pid, (uint64_t)stat_loc, options, 0, 0, 0, 0, 0); in waitpid()
|
/DragonOS-0.1.8/kernel/src/ktest/ |
D | test-mutex.c | 55 pid_t pid = kernel_thread(ktest_mutex_case1_pid1, 0, 0); in ktest_mutex_case1() local 64 assert(wt->pcb->pid == pid); in ktest_mutex_case1() 69 waitpid(pid, &stat, 0); in ktest_mutex_case1()
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 55 pid: i64, field 119 let pid: &i64 = &self.fdata.pid; in open_status() localVariable 120 let pcb = unsafe { process_find_pcb_by_pid(*pid).as_mut() }; in open_status() 124 pid in open_status() 149 pdata.append(&mut format!("\npid:\t{}", pcb.pid).as_bytes().to_owned()); in open_status() 151 &mut format!("\nPpid:\t{}", unsafe { *pcb.parent_pcb }.pid) in open_status() 263 pid: 0, in new() 283 pub fn register_pid(&self, pid: i64) -> Result<(), SystemError> { in register_pid() 287 let _pf: Arc<dyn IndexNode> = proc.create(&pid.to_string(), FileType::Dir, 0o777)?; in register_pid() 295 _sf.0.lock().fdata.pid = pid; in register_pid() [all …]
|
/DragonOS-0.1.8/user/libs/libc/src/ |
D | signal.c | 64 int kill(pid_t pid, int sig) in kill() argument 66 syscall_invoke(SYS_KILL, pid, sig, 0, 0, 0, 0, 0, 0); in kill()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | mutex.rs | 68 if self.check_pid_in_wait_list(&inner, current_pcb().pid) == false { in lock() 136 fn check_pid_in_wait_list(&self, inner: &MutexInner, pid: pid_t) -> bool { in check_pid_in_wait_list() 138 if p.pid == pid { in check_pid_in_wait_list()
|
D | semaphore.rs | 54 current_pcb().pid, in up()
|
/DragonOS-0.1.8/kernel/src/common/sys/ |
D | wait.h | 12 pid_t waitpid(pid_t pid, int *stat_loc, int options);
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | syscall.c | 85 uint64_t c_sys_wait4(pid_t pid, int *status, int options, void *rusage) in c_sys_wait4() argument 95 child_proc = process_find_pcb_by_pid(pid); in c_sys_wait4()
|
/DragonOS-0.1.8/user/libs/libc/src/include/export/sys/ |
D | wait.h | 21 pid_t waitpid(pid_t pid, int *stat_loc, int options);
|
/DragonOS-0.1.8/kernel/src/exception/ |
D | trap.c | 16 regs->rsp, regs->rip, proc_current_cpu_id, current_pcb->pid); in do_divide_error() 28 proc_current_cpu_id, current_pcb->pid); in do_debug() 89 regs->rsp, regs->rip, proc_current_cpu_id, current_pcb->pid); in do_undefined_opcode() 100 regs->rip, proc_current_cpu_id, current_pcb->pid); in do_dev_not_avaliable() 190 regs->rsp, regs->rip, proc_current_cpu_id, current_pcb->pid); in do_general_protection() 222 regs->rsp, regs->rbp, regs->rip, proc_current_cpu_id, current_pcb->pid); in do_page_fault()
|
/DragonOS-0.1.8/tools/qemu/ |
D | ifup-nat | 57 --pid-file=/var/run/qemu-dhcp-$BRIDGE.pid \
|
/DragonOS-0.1.8/kernel/src/ipc/ |
D | signal.rs | 29 pid::PidType, 70 pid: pid_t, in signal_kill_something_info() 73 if pid <= 0 { in signal_kill_something_info() 74 kwarn!("Kill operation not support: pid={}", pid); in signal_kill_something_info() 79 return signal_kill_proc_info(sig, info, pid); in signal_kill_something_info() 85 pid: pid_t, in signal_kill_proc_info() 92 let pcb = unsafe { process_find_pcb_by_pid(pid).as_mut() }; in signal_kill_proc_info() 163 kBUG!("Sighand ptr of process {pid} is NULL!", pid = pcb.pid); in lock_process_sighand() 245 q._sinfo.data._sifields._kill._pid = current_pcb().pid; in __send_signal_locked() 411 current_pcb().pid in do_signal() [all …]
|
D | syscall.rs | 44 pub fn kill(pid: pid_t, sig: c_int) -> Result<usize, SystemError> { in kill() 61 _kill: super::signal_types::__sifields__kill { _pid: pid }, in kill() 68 let retval = signal_kill_something_info(sig, Some(&mut info), pid).map(|x| x as usize); in kill() 145 current_pcb().pid, in sigaction()
|
/DragonOS-0.1.8/docs/kernel/ktest/ |
D | ktest-framework.md | 55   我们可以在pid≥1的内核线程中发起测试。由于DragonOS目前尚不完善,您可以在`process/process.c`中的`initial_kernel_thread()… 86   测试线程的pid
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | context.rs | 22 next.pid in switch_process()
|
/DragonOS-0.1.8/docs/kernel/ipc/ |
D | signal.md | 17   当进程A想发送信号给进程B的时候,使用`kill(pid, signal)`接口进行发送。然后陷入内核的`sys_kill()`函数中进行处理。然后内核将会把信号加入目标进程…
|
/DragonOS-0.1.8/kernel/src/debug/traceback/ |
D | traceback.c | 39 …BLACK, "Kernel traceback: Fault in userland. pid=%ld, rbp=%#018lx\n", current_pcb->pid, regs->rbp); in traceback()
|