Fix the exec hack

上级 d577eaf4
......@@ -207,6 +207,7 @@ exec(const char *path, char **argv, void *ascopev)
myproc()->vmap = vmp;
myproc()->tf->rip = elf.entry;
myproc()->tf->rsp = sp;
myproc()->run_cpuid_ = myid();
for(last=s=path; *s; s++)
if(*s == '/')
......
......@@ -218,8 +218,6 @@ execstub(void)
post_swtch();
myproc()->run_cpuid_ = mycpuid();
long r = doexec(upath, uargv);
myproc()->tf->rax = r;
......
......@@ -471,6 +471,7 @@ clean:
int
sys_exec(const char *upath, userptr<userptr<const char> > uargv)
{
myproc()->exec_cpuid_ = myid();
#if EXECSWITCH
myproc()->exec_cpuid_ = mycpuid();
myproc()->uargv = uargv;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论