Lines Matching refs:pcb

12 int process_copy_files(uint64_t clone_flags, struct process_control_block *pcb);
13 int process_copy_flags(uint64_t clone_flags, struct process_control_block *pcb);
14 int process_copy_mm(uint64_t clone_flags, struct process_control_block *pcb);
15 int process_copy_thread(uint64_t clone_flags, struct process_control_block *pcb, uint64_t stack_sta…
18 extern int process_copy_sighand(uint64_t clone_flags, struct process_control_block *pcb);
19 extern int process_copy_signal(uint64_t clone_flags, struct process_control_block *pcb);
20 extern void process_exit_sighand(struct process_control_block *pcb);
21 extern void process_exit_signal(struct process_control_block *pcb);
81 tsk->prev_pcb = &initial_proc_union.pcb; in do_fork()
83 tsk->next_pcb = initial_proc_union.pcb.next_pcb; in do_fork()
85 initial_proc_union.pcb.next_pcb = tsk; in do_fork()
169 int process_copy_flags(uint64_t clone_flags, struct process_control_block *pcb) in process_copy_flags() argument
172 pcb->flags |= PF_VFORK; in process_copy_flags()
183 int process_copy_files(uint64_t clone_flags, struct process_control_block *pcb) in process_copy_files() argument
197 pcb->fds[i] = (struct vfs_file_t *)kmalloc(sizeof(struct vfs_file_t), 0); in process_copy_files()
198 memcpy(pcb->fds[i], current_pcb->fds[i], sizeof(struct vfs_file_t)); in process_copy_files()
211 int process_copy_mm(uint64_t clone_flags, struct process_control_block *pcb) in process_copy_mm() argument
217 pcb->mm = current_pcb->mm; in process_copy_mm()
228 pcb->mm = new_mms; in process_copy_mm()
345 int process_copy_thread(uint64_t clone_flags, struct process_control_block *pcb, uint64_t stack_sta… in process_copy_thread() argument
349 struct thread_struct *thd = (struct thread_struct *)(pcb + 1); in process_copy_thread()
351 pcb->thread = thd; in process_copy_thread()
355 if (pcb->flags & PF_KFORK) // 内核态下的fork in process_copy_thread()
360 child_regs = (struct pt_regs *)(((uint64_t)pcb) + STACK_SIZE - size); in process_copy_thread()
364 process_rewrite_rbp(child_regs, pcb); in process_copy_thread()
368 child_regs = (struct pt_regs *)((uint64_t)pcb + STACK_SIZE - sizeof(struct pt_regs)); in process_copy_thread()
376 if (pcb->flags & PF_KFORK) in process_copy_thread()
380 thd->rbp = (uint64_t)pcb + STACK_SIZE; in process_copy_thread()
388 if (pcb->flags & PF_KFORK) in process_copy_thread()
390 else if (pcb->flags & PF_KTHREAD && (!(pcb->flags & PF_KFORK))) in process_copy_thread()