summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2014-08-27 17:15:30 -0400
committerRobert Morris <[email protected]>2014-08-27 17:15:30 -0400
commit71453f72f285a17ccf0520b9dbdafdc701ff2f4a (patch)
tree978d30844e643e67a807a73db20ccc5d2823f8f2 /file.c
parent2c56547272e43b483d560a61692f1e24926a82fb (diff)
downloadxv6-labs-71453f72f285a17ccf0520b9dbdafdc701ff2f4a.tar.gz
xv6-labs-71453f72f285a17ccf0520b9dbdafdc701ff2f4a.tar.bz2
xv6-labs-71453f72f285a17ccf0520b9dbdafdc701ff2f4a.zip
a start at concurrent FS system calls
Diffstat (limited to 'file.c')
-rw-r--r--file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/file.c b/file.c
index 53c5af2..98cad1e 100644
--- a/file.c
+++ b/file.c
@@ -72,9 +72,9 @@ fileclose(struct file *f)
if(ff.type == FD_PIPE)
pipeclose(ff.pipe, ff.writable);
else if(ff.type == FD_INODE){
- begin_trans();
+ begin_op();
iput(ff.ip);
- commit_trans();
+ end_op();
}
}
@@ -136,12 +136,12 @@ filewrite(struct file *f, char *addr, int n)
if(n1 > max)
n1 = max;
- begin_trans();
+ begin_op();
ilock(f->ip);
if ((r = writei(f->ip, addr + i, f->off, n1)) > 0)
f->off += r;
iunlock(f->ip);
- commit_trans();
+ end_op();
if(r < 0)
break;