a start at concurrent FS system calls
This commit is contained in:
parent
2c56547272
commit
71453f72f2
6 changed files with 95 additions and 61 deletions
8
exec.c
8
exec.c
|
|
@ -18,9 +18,9 @@ exec(char *path, char **argv)
|
|||
struct proghdr ph;
|
||||
pde_t *pgdir, *oldpgdir;
|
||||
|
||||
begin_trans();
|
||||
begin_op();
|
||||
if((ip = namei(path)) == 0){
|
||||
commit_trans();
|
||||
end_op();
|
||||
return -1;
|
||||
}
|
||||
ilock(ip);
|
||||
|
|
@ -50,7 +50,7 @@ exec(char *path, char **argv)
|
|||
goto bad;
|
||||
}
|
||||
iunlockput(ip);
|
||||
commit_trans();
|
||||
end_op();
|
||||
ip = 0;
|
||||
|
||||
// Allocate two pages at the next page boundary.
|
||||
|
|
@ -101,7 +101,7 @@ exec(char *path, char **argv)
|
|||
freevm(pgdir);
|
||||
if(ip){
|
||||
iunlockput(ip);
|
||||
commit_trans();
|
||||
end_op();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue