Straight replacement of B_BUSY with a sleeping lock.

This commit is contained in:
Frans Kaashoek 2016-09-11 17:24:04 -04:00
parent 551c2f3576
commit 6670d3b5e0
8 changed files with 45 additions and 21 deletions

3
exec.c
View file

@ -19,6 +19,8 @@ exec(char *path, char **argv)
pde_t *pgdir, *oldpgdir;
begin_op();
cprintf("exec %s\n", path);
if((ip = namei(path)) == 0){
end_op();
return -1;
@ -98,6 +100,7 @@ exec(char *path, char **argv)
proc->tf->esp = sp;
switchuvm(proc);
freevm(oldpgdir);
cprintf("exec succeeded\n");
return 0;
bad: