Home
last modified time | relevance | path

Searched refs:pid (Results 1 – 25 of 37) sorted by relevance

12

/DragonOS-0.1.9/kernel/src/process/
Dexit.rs17 abi::WaitOption, pid::PidType, resource::RUsage, Pid, ProcessControlBlock, ProcessManager,
25 pub pid: Pid, field
35 pub pid: Pid, field
41 pub fn new(pid_type: PidType, pid: Pid, options: WaitOption) -> Self { in new()
44 pid, in new()
55 mut pid: i64, in kernel_wait4()
61 if pid == i64::MIN { in kernel_wait4()
68 if pid == -1 { in kernel_wait4()
70 } else if pid < 0 { in kernel_wait4()
73 pid = -pid; in kernel_wait4()
[all …]
Dfork.rs171 current_pcb.pid(), in fork()
172 pcb.pid(), in fork()
180 procfs_register_pid(pcb.pid()).unwrap_or_else(|e| { in fork()
183 pcb.pid(), in fork()
191 pcb.pid(), in fork()
196 return Ok(pcb.pid()); in fork()
234 current_pcb.pid() in copy_mm()
245 current_pcb.pid(), new_pcb.pid(), e in copy_mm()
389 writer.copy_one_to_user(&(pcb.pid().0 as i32), 0)?; in copy_process()
396 current_pcb.pid(), pcb.pid(), e in copy_process()
[all …]
Dsyscall.rs34 ProcessManager::fork(frame, CloneFlags::empty()).map(|pid| pid.into()) in fork()
100 pid: i64, in wait4()
123 let r = kernel_wait4(pid, wstatus_buf, options, tmp_rusage.as_mut())?; in wait4()
157 pub fn getpgid(mut pid: Pid) -> Result<Pid, SystemError> { in getpgid()
158 if pid == Pid(0) { in getpgid()
160 pid = current_pcb.pid(); in getpgid()
162 let target_proc = ProcessManager::find(pid).ok_or(SystemError::ESRCH)?; in getpgid()
196 procfs_register_pid(pcb.pid()).unwrap_or_else(|e| { in clone()
199 pcb.pid(), in clone()
212 writer.copy_one_to_user(&(pcb.pid().data() as i32), 0)?; in clone()
[all …]
Dmod.rs67 pub mod pid; module
153 return ProcessManager::current_pcb().pid(); in current_pid()
181 pub fn find(pid: Pid) -> Option<Arc<ProcessControlBlock>> { in find()
182 return ALL_PROCESS.lock_irqsave().as_ref()?.get(&pid).cloned(); in find()
199 .insert(pcb.pid(), pcb.clone()); in add_pcb()
308 if current.pid() != Pid(1) { in exit_notify()
319 let r = Syscall::kill(parent_pcb.pid(), Signal::SIGCHLD as i32); in exit_notify()
323 current.pid(), in exit_notify()
324 parent_pcb.pid() in exit_notify()
374 pub unsafe fn release(pid: Pid) { in release()
[all …]
Dkthread.rs258 assert!(ProcessManager::current_pcb().pid() == Pid::new(0)); in init_stage1()
358 .expect(format!("Failed to wakeup kthread: {:?}", pcb.pid()).as_str()); in create_and_run()
379 pcb.pid() in stop()
426 pcb.pid() in should_stop()
441 kdebug!("kthread_daemon: pid: {:?}", current_pcb.pid()); in kthread_daemon()
Dc_adapter.rs27 return ProcessManager::current_pcb().pid().0 as u32; in rs_current_pcb_pid()
Dprocess.rs29 if ProcessManager::current_pcb().pid() != Pid(1) { in stdio_init()
/DragonOS-0.1.9/user/apps/test_mkfifo/
Dmain.c15 pid_t pid; in main() local
25 pid = fork(); in main()
27 if (pid < 0) in main()
32 else if (pid == 0) in main()
69 waitpid(pid, &status, 0); in main()
/DragonOS-0.1.9/kernel/src/debug/klog/
Dmm.rs32 let pid = if unlikely(!ProcessManager::initialized()) { in mm_debug_log() localVariable
35 Some(ProcessManager::current_pcb().pid()) in mm_debug_log()
37 MMDebugLogManager::log(log_type, source, pid); in mm_debug_log()
54 pub fn log(log_type: AllocatorLogType, source: LogSource, pid: Option<Pid>) { in log()
60 pid.map(|p| p.data()), in log()
/DragonOS-0.1.9/kernel/src/sched/
Dsyscall.rs28 if current_pcb.pid() != next_pcb.pid() { in sched()
29 CPU_EXECUTING.set(smp_get_processor_id(), next_pcb.pid()); in sched()
Dcore.rs41 pub fn set(&self, cpu_id: ProcessorId, pid: Pid) { in set()
42 self.data[cpu_id.data() as usize].store(pid, Ordering::SeqCst); in set()
169 if pcb.pid().into() > 0 { in sched_enqueue()
/DragonOS-0.1.9/kernel/src/arch/x86_64/syscall/
Dmod.rs55 let pid = ProcessManager::current_pcb().pid(); localVariable
56 crate::kdebug!("syscall return:pid={:?},ret= {:?}\n", pid, ret as isize);
89 let pid = ProcessManager::current_pcb().pid(); in syscall_handler() localVariable
98 crate::kdebug!("syscall: pid: {:?}, num={:?}\n", pid, syscall_num); in syscall_handler()
/DragonOS-0.1.9/kernel/src/arch/x86_64/process/
Dkthread.rs45 let pid = ProcessManager::fork(&mut frame, clone_flags).map_err(|e| { in __inner_create() localVariable
50 ProcessManager::find(pid) in __inner_create()
54 return Ok(pid); in __inner_create()
Dsyscall.rs161 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/filesystem/procfs/
Dmod.rs71 pid: Pid, field
136 let pid = self.fdata.pid; in open_status() localVariable
137 let pcb = ProcessManager::find(pid); in open_status()
141 pid in open_status()
168 &mut format!("\nPid:\t{}", pcb.pid().into()) in open_status()
313 pid: Pid::new(0), in new()
340 meminfo_file.0.lock().fdata.pid = Pid::new(0); in new()
353 kmsg_file.0.lock().fdata.pid = Pid::new(1); in new()
364 pub fn register_pid(&self, pid: Pid) -> Result<(), SystemError> { in register_pid()
369 &pid.to_string(), in register_pid()
[all …]
/DragonOS-0.1.9/kernel/src/ipc/
Dsignal.rs11 process::{pid::PidType, Pid, ProcessControlBlock, ProcessFlags, ProcessManager},
29 pid: Pid, in send_signal_info()
37 if pid.lt(&Pid::from(0)) { in send_signal_info()
38 kwarn!("Kill operation not support: pid={:?}", pid); in send_signal_info()
47 let pcb = ProcessManager::find(pid); in send_signal_info()
119 SigType::Kill(ProcessManager::current_pcb().pid()), in send_signal()
303 ProcessManager::current_pcb().pid(), in signal_wake_up()
304 pcb.pid(), in signal_wake_up()
313 ProcessManager::current_pcb().pid(), in signal_wake_up()
314 pcb.pid(), in signal_wake_up()
Dsyscall.rs78 pub fn kill(pid: Pid, sig: c_int) -> Result<usize, SystemError> { in kill()
87 let mut info = SigInfo::new(sig, 0, SigCode::User, SigType::Kill(pid)); in kill()
92 .send_signal_info(Some(&mut info), pid) in kill()
166 ProcessManager::current_pcb().pid(), in sigaction()
/DragonOS-0.1.9/kernel/src/libs/
Dmutex.rs67 if self.check_pid_in_wait_list(&inner, ProcessManager::current_pcb().pid()) == false in lock()
135 fn check_pid_in_wait_list(&self, inner: &MutexInner, pid: Pid) -> bool { in check_pid_in_wait_list()
137 if p.pid() == pid { in check_pid_in_wait_list()
Dsemaphore.rs56 ProcessManager::current_pcb().pid().into(), in up()
/DragonOS-0.1.9/kernel/src/driver/tty/
Dtty_job_control.rs23 ctrl.pgid = Some(pcb.pid()); in proc_set_tty()
24 ctrl.session = Some(pcb.pid()); in proc_set_tty()
47 let pgid = pcb.pid(); in tty_check_change()
99 || ctrl.session.unwrap() != current.pid() in job_ctrl_ioctl()
/DragonOS-0.1.9/tools/qemu/
Difup-nat57 --pid-file=/var/run/qemu-dhcp-$BRIDGE.pid \
/DragonOS-0.1.9/kernel/src/arch/x86_64/ipc/
Dsignal.rs464 kerror!("Trying to handle a Sigerror on Process:{:?}", pcb.pid()); 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()
626 let r = Syscall::kill(ProcessManager::current_pcb().pid(), Signal::SIGSEGV as i32); in setup_frame()
637 let r = Syscall::kill(ProcessManager::current_pcb().pid(), Signal::SIGSEGV as i32); in setup_frame()
651 let r = Syscall::kill(ProcessManager::current_pcb().pid(), Signal::SIGSEGV as i32); in setup_frame()
[all …]
/DragonOS-0.1.9/kernel/crates/klog_types/src/
Dlib.rs26 pub pid: Option<usize>, field
45 pid: Option<usize>, in new()
53 pid, in new()
67 pid: None, in zeroed()
/DragonOS-0.1.9/kernel/src/syscall/
Dmod.rs299 let pid = args[0] as i32; in handle() localVariable
305 Self::wait4(pid.into(), wstatus, options, rusage) in handle()
420 let pid = Pid::new(args[0]); in handle() localVariable
423 Self::kill(pid, sig) in handle()
433 SYS_GETPID => Self::getpid().map(|pid| pid.into()), in handle()
666 SYS_GETPGID => Self::getpgid(Pid::new(args[0])).map(|pid| pid.into()), in handle()
668 SYS_GETPPID => Self::getppid().map(|pid| pid.into()), in handle()
939 let pid = args[0]; in handle() localVariable
940 let pid = Pid::new(pid); in handle() localVariable
945 Self::prlimit64(pid, resource, new_limit, old_limit) in handle()
[all …]
/DragonOS-0.1.9/docs/kernel/ipc/
Dsignal.md17 &emsp;&emsp;当进程A想发送信号给进程B的时候,使用`kill(pid, signal)`接口进行发送。然后陷入内核的`sys_kill()`函数中进行处理。然后内核将会把信号加入目标进程…

12