mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 04:56:30 +00:00
完善execve,使其能加载用户程序文件
This commit is contained in:
@ -279,11 +279,12 @@ struct process_control_block *process_get_pcb(long pid);
|
||||
* @param next 下一个进程的pcb
|
||||
*
|
||||
*/
|
||||
#define process_switch_mm(prev, next) \
|
||||
do \
|
||||
{ \
|
||||
asm volatile("movq %0, %%cr3 \n\t" ::"r"(next->mm->pgd) \
|
||||
: "memory"); \
|
||||
#define process_switch_mm(next_pcb) \
|
||||
do \
|
||||
{ \
|
||||
asm volatile("movq %0, %%cr3 \n\t" ::"r"(next_pcb->mm->pgd) \
|
||||
: "memory"); \
|
||||
flush_tlb(); \
|
||||
} while (0)
|
||||
|
||||
// 获取当前cpu id
|
||||
|
Reference in New Issue
Block a user