Lines Matching refs:current_pcb
139 kdebug("init proc's preempt_count=%ld", current_pcb->preempt_count); in smp_init()
162 memset(current_pcb, 0, sizeof(struct process_control_block)); in smp_ap_start()
165 current_pcb->state = PROC_RUNNING; in smp_ap_start()
166 current_pcb->flags = PF_KTHREAD; in smp_ap_start()
167 current_pcb->mm = &initial_mm; in smp_ap_start()
169 list_init(¤t_pcb->list); in smp_ap_start()
170 current_pcb->addr_limit = KERNEL_BASE_LINEAR_ADDR; in smp_ap_start()
171 current_pcb->priority = 2; in smp_ap_start()
172 current_pcb->virtual_runtime = 0; in smp_ap_start()
174 current_pcb->thread = (struct thread_struct *)(current_pcb + 1); // 将线程结构体放置在pcb后方 in smp_ap_start()
175 current_pcb->thread->rbp = cpu_core_info[current_starting_cpu].stack_start; in smp_ap_start()
176 current_pcb->thread->rsp = cpu_core_info[current_starting_cpu].stack_start; in smp_ap_start()
177 current_pcb->thread->fs = KERNEL_DS; in smp_ap_start()
178 current_pcb->thread->gs = KERNEL_DS; in smp_ap_start()
179 current_pcb->cpu_id = current_starting_cpu; in smp_ap_start()
181 initial_proc[proc_current_cpu_id] = current_pcb; in smp_ap_start()
184 current_pcb->preempt_count = 0; in smp_ap_start()
186 sched_set_cpu_idle(current_starting_cpu, current_pcb); in smp_ap_start()
192 current_pcb->flags |= PF_NEED_SCHED; in smp_ap_start()