Fix the exec hack

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