Lines Matching refs:pcb

44 extern void process_exit_sighand(struct process_control_block *pcb);
45 extern void process_exit_signal(struct process_control_block *pcb);
46 extern void initial_proc_init_signal(struct process_control_block *pcb);
47 extern void rs_process_exit_fpstate(struct process_control_block *pcb);
48 extern void rs_drop_address_space(struct process_control_block *pcb);
76 __attribute__((__section__(".data.init_proc_union"))) = {INITIAL_PROC(initial_proc_union.pcb)};
78 struct process_control_block *initial_proc[MAX_CPU_NUM] = {&initial_proc_union.pcb, 0};
89 extern int process_exit_files(struct process_control_block *pcb);
97 uint64_t process_exit_mm(struct process_control_block *pcb);
250 struct process_control_block *pcb = current_pcb; in process_do_exit() local
253 process_exit_files(pcb); in process_do_exit()
254 process_exit_thread(pcb); in process_do_exit()
257 pcb->state = PROC_ZOMBIE; in process_do_exit()
258 pcb->exit_code = code; in process_do_exit()
330 list_init(&initial_proc_union.pcb.list); in process_init()
331 wait_queue_init(&initial_proc_union.pcb.wait_child_proc_exit, NULL); in process_init()
351 initial_proc_union.pcb.state = PROC_RUNNING; in process_init()
352 initial_proc_union.pcb.preempt_count = 0; in process_init()
353 initial_proc_union.pcb.cpu_id = 0; in process_init()
354 initial_proc_union.pcb.virtual_runtime = (1UL << 60); in process_init()
369 struct process_control_block *pcb = initial_proc_union.pcb.next_pcb; in process_find_pcb_by_pid() local
372 for (; pcb != &initial_proc_union.pcb; pcb = pcb->next_pcb) in process_find_pcb_by_pid()
374 if (pcb->pid == pid) in process_find_pcb_by_pid()
375 return pcb; in process_find_pcb_by_pid()
388 int process_wakeup(struct process_control_block *pcb) in process_wakeup() argument
391 BUG_ON(pcb == NULL); in process_wakeup()
392 if (pcb == NULL) in process_wakeup()
395 if (pcb->state & PROC_RUNNING) in process_wakeup()
398 pcb->state |= PROC_RUNNING; in process_wakeup()
399 sched_enqueue(pcb, true); in process_wakeup()
408 int process_wakeup_immediately(struct process_control_block *pcb) in process_wakeup_immediately() argument
410 if (pcb->state & PROC_RUNNING) in process_wakeup_immediately()
412 int retval = process_wakeup(pcb); in process_wakeup_immediately()
418 if (pcb->cpu_id == current_pcb->cpu_id) in process_wakeup_immediately()
421 rs_kick_cpu(pcb->cpu_id); in process_wakeup_immediately()
431 uint64_t process_exit_mm(struct process_control_block *pcb) in process_exit_mm() argument
433 rs_drop_address_space(pcb); in process_exit_mm()
442 void process_exit_thread(struct process_control_block *pcb) in process_exit_thread() argument
452 int process_release_pcb(struct process_control_block *pcb) in process_release_pcb() argument
454 if ((pcb->flags & PF_KTHREAD)) // 释放内核线程的worker private结构体 in process_release_pcb()
455 free_kthread_struct(pcb); in process_release_pcb()
459 pcb->prev_pcb->next_pcb = pcb->next_pcb; in process_release_pcb()
460 pcb->next_pcb->prev_pcb = pcb->prev_pcb; in process_release_pcb()
461 process_exit_sighand(pcb); in process_release_pcb()
462 process_exit_signal(pcb); in process_release_pcb()
463 rs_process_exit_fpstate(pcb); in process_release_pcb()
464 rs_procfs_unregister_pid(pcb->pid); in process_release_pcb()
466 process_exit_mm(pcb); in process_release_pcb()
468 kfree(pcb); in process_release_pcb()
478 static void __set_pcb_name(struct process_control_block *pcb, const char *pcb_name) in __set_pcb_name() argument
482 strncpy(pcb->name, pcb_name, PCB_NAME_LEN); in __set_pcb_name()
492 void process_set_pcb_name(struct process_control_block *pcb, const char *pcb_name) in process_set_pcb_name() argument
494 __set_pcb_name(pcb, pcb_name); in process_set_pcb_name()