提交 d6dc5bcb 创建 作者: Robert Morris's avatar Robert Morris

Merge branch 'master' of g.csail.mit.edu:xv6-dev

...@@ -20,7 +20,6 @@ exec(char *path, char **argv) ...@@ -20,7 +20,6 @@ exec(char *path, char **argv)
begin_op(); begin_op();
cprintf("exec %s\n", path);
if((ip = namei(path)) == 0){ if((ip = namei(path)) == 0){
end_op(); end_op();
return -1; return -1;
...@@ -100,7 +99,6 @@ exec(char *path, char **argv) ...@@ -100,7 +99,6 @@ exec(char *path, char **argv)
proc->tf->esp = sp; proc->tf->esp = sp;
switchuvm(proc); switchuvm(proc);
freevm(oldpgdir); freevm(oldpgdir);
cprintf("exec succeeded\n");
return 0; return 0;
bad: bad:
......
...@@ -35,12 +35,14 @@ sysproc.c ...@@ -35,12 +35,14 @@ sysproc.c
# file system # file system
buf.h buf.h
sleeplock.h
fcntl.h fcntl.h
stat.h stat.h
fs.h fs.h
file.h file.h
ide.c ide.c
bio.c bio.c
sleeplock.c
log.c log.c
fs.c fs.c
file.c file.c
......
...@@ -61,7 +61,7 @@ release(struct spinlock *lk) ...@@ -61,7 +61,7 @@ release(struct spinlock *lk)
// Release the lock, equivalent to lk->locked = 0. // Release the lock, equivalent to lk->locked = 0.
// This code can't use a C assignment, since it might // This code can't use a C assignment, since it might
// not be atomic. // not be atomic. A real OS would use C atomics here.
asm volatile("movl $0, %0" : "+m" (lk->locked) : ); asm volatile("movl $0, %0" : "+m" (lk->locked) : );
popcli(); popcli();
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论