/DragonOS-0.1.2/user/apps/shell/ |
D | cmd_test.c | 11 pid_t pid; in shell_pipe_test() local 20 pid = fork(); in shell_pipe_test() 21 if (0 == pid) { in shell_pipe_test()
|
D | cmd.c | 476 pid_t pid = fork(); in shell_cmd_exec() local 480 if (pid == 0) in shell_cmd_exec() 497 waitpid(pid, &retval, 0); in shell_cmd_exec() 501 printf("[1] %d\n", pid); in shell_cmd_exec()
|
/DragonOS-0.1.2/docs/kernel/process_management/ |
D | pcb.md | 11 ### 根据pid寻找pcb 15 该API提供了根据pid寻找pcb的功能,定义在`kernel/src/process/process.h`中。 21 **pid**
|
/DragonOS-0.1.2/kernel/src/driver/usb/xhci/ |
D | internal.h | 57 #define XHCI_PORT_IS_USB2(cid, pid) ((xhci_hc[cid].ports[pid].flags & XHCI_PROTOCOL_INFO) == XHCI_P… argument 58 #define XHCI_PORT_IS_USB3(cid, pid) ((xhci_hc[cid].ports[pid].flags & XHCI_PROTOCOL_INFO) == XHCI_P… argument 60 #define XHCI_PORT_IS_USB2_HSO(cid, pid) ((xhci_hc[cid].ports[pid].flags & XHCI_PROTOCOL_HSO) == XHC… argument 61 #define XHCI_PORT_HAS_PAIR(cid, pid) ((xhci_hc[cid].ports[pid].flags & XHCI_PROTOCOL_HAS_PAIR) == X… argument 62 #define XHCI_PORT_IS_ACTIVE(cid, pid) ((xhci_hc[cid].ports[pid].flags & XHCI_PROTOCOL_ACTIVE) == XH… argument
|
/DragonOS-0.1.2/kernel/src/filesystem/procfs/ |
D | procfs.h | 33 long pid; member 43 int64_t procfs_register_pid(long pid);
|
D | procfs.c | 19 static int64_t proc_create_file(const char *path, mode_t type, long pid); 119 struct process_control_block *pcb_t = process_find_pcb_by_pid(finode->pid); in procfs_open() 132 data_puts(fdata, ltoa(pcb_t->pid)); in procfs_open() 134 data_puts(fdata, ltoa(pcb_t->parent_pcb->pid)); in procfs_open() 392 finode->pid = 0; in procfs_mkdir() 446 int64_t procfs_register_pid(long pid) in procfs_register_pid() argument 452 int len = strlen(ltoa(pid)); in procfs_register_pid() 455 strcpy(tmp + 6, ltoa(pid)); in procfs_register_pid() 463 retval = proc_create_file(tmp, PROC_STATUS, pid); in procfs_register_pid() 476 static int64_t proc_create_file(const char *path, mode_t type, long pid) in proc_create_file() argument [all …]
|
/DragonOS-0.1.2/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.2/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()
|
D | wait.h | 21 pid_t waitpid(pid_t pid, int *stat_loc, int options);
|
/DragonOS-0.1.2/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.2/kernel/src/process/ |
D | mod.rs | 1 pub mod pid; module
|
D | kthread.c | 193 pid_t pid = kernel_thread(kthread, create, CLONE_FS | CLONE_SIGNAL); in __create_kthread() local 195 if (IS_ERR((void *)pid)) in __create_kthread() 199 create->result = (struct process_control_block *)pid; in __create_kthread()
|
D | initial_proc.rs | 31 assert_eq!(unsafe { (*pcb).pid }, 0); in initial_proc_init_signal()
|
D | proc-types.h | 104 long pid; member
|
D | process.h | 97 struct process_control_block *process_find_pcb_by_pid(pid_t pid);
|
D | fork.c | 77 tsk->pid = process_global_pid++; in do_fork() 132 retval = tsk->pid; in do_fork() 140 procfs_register_pid(tsk->pid); in do_fork()
|
D | process.c | 58 ….mm = &initial_mm, .thread = &initial_thread, .addr_limit = 0xffffffffffffffff, .pid = 0, .priorit… 651 struct process_control_block *process_find_pcb_by_pid(pid_t pid) in process_find_pcb_by_pid() argument 660 if (pcb->pid == pid) in process_find_pcb_by_pid()
|
/DragonOS-0.1.2/kernel/src/common/sys/ |
D | wait.h | 12 pid_t waitpid(pid_t pid, int *stat_loc, int options);
|
/DragonOS-0.1.2/kernel/src/ipc/ |
D | signal.rs | 24 pid::PidType, 65 let pid: pid_t = regs.r8 as pid_t; in sys_kill() localVariable 82 _kill: super::signal_types::__sifields__kill { _pid: pid }, in sys_kill() 89 let retval = signal_kill_something_info(sig, Some(&mut info), pid) as u64; in sys_kill() 99 fn signal_kill_something_info(sig: SignalNumber, info: Option<&mut siginfo>, pid: pid_t) -> i32 { in signal_kill_something_info() 101 if pid <= 0 { in signal_kill_something_info() 102 kwarn!("Kill operation not support: pid={}", pid); in signal_kill_something_info() 107 return signal_kill_proc_info(sig, info, pid); in signal_kill_something_info() 110 fn signal_kill_proc_info(sig: SignalNumber, info: Option<&mut siginfo>, pid: pid_t) -> i32 { in signal_kill_proc_info() 116 let pcb = unsafe { process_find_pcb_by_pid(pid).as_mut() }; in signal_kill_proc_info() [all …]
|
/DragonOS-0.1.2/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() 189 regs->rsp, regs->rip, proc_current_cpu_id, current_pcb->pid); in do_general_protection() 221 regs->rsp, regs->rbp, regs->rip, proc_current_cpu_id, current_pcb->pid); in do_page_fault()
|
/DragonOS-0.1.2/docs/kernel/ktest/ |
D | ktest-framework.md | 55   我们可以在pid≥1的内核线程中发起测试。由于DragonOS目前尚不完善,您可以在`process/process.c`中的`initial_kernel_thread()… 86   测试线程的pid
|
/DragonOS-0.1.2/kernel/src/mm/ |
D | mmio.c | 70 kerror("failed to create mmio vma. pid=%d", current_pcb->pid); in mmio_create() 94 …r("mmio_release failed: vma not found. At address: %#018lx, pid=%ld", vaddr + i, current_pcb->pid); in mmio_release()
|
/DragonOS-0.1.2/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()
|
/DragonOS-0.1.2/kernel/src/syscall/ |
D | syscall.c | 499 uint64_t pid = regs->r8; in sys_wait4() local 511 child_proc = process_find_pcb_by_pid(pid); in sys_wait4()
|
/DragonOS-0.1.2/kernel/src/driver/timers/HPET/ |
D | HPET.c | 83 … if (timer_jiffies >= video_refresh_expire_jiffies || (video_last_refresh_pid != current_pcb->pid)) in HPET_handler()
|