Home
last modified time | relevance | path

Searched refs:child_regs (Results 1 – 1 of 1) sorted by relevance

/DragonOS-0.1.8/kernel/src/process/
Dfork.c250 struct pt_regs *child_regs = NULL; in process_copy_thread() local
257 child_regs = (struct pt_regs *)(((uint64_t)pcb) + STACK_SIZE - size); in process_copy_thread()
258 memcpy(child_regs, (void *)current_regs, size); in process_copy_thread()
262 process_rewrite_rbp(child_regs, pcb); in process_copy_thread()
266 child_regs = (struct pt_regs *)((uint64_t)pcb + STACK_SIZE - sizeof(struct pt_regs)); in process_copy_thread()
267 memcpy(child_regs, current_regs, sizeof(struct pt_regs)); in process_copy_thread()
269 child_regs->rsp = stack_start; in process_copy_thread()
273 child_regs->rax = 0; in process_copy_thread()
275 thd->rbp = (uint64_t)(child_regs + 1); // 设置新的内核线程开始执行时的rbp(也就是进入ret_from_intr时的rbp) in process_copy_thread()
280 thd->rsp = (uint64_t)child_regs; in process_copy_thread()