summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2012-08-22 20:28:58 -0400
committerFrans Kaashoek <[email protected]>2012-08-22 20:28:58 -0400
commit95692c4a8cf38765bac15b05d7a898e4ac8946e8 (patch)
tree07d2fc5960381a2d7d0690f915842d2fb5170ca2
parent432acbaf9e8817e16026bfcaaa8bca0ba7c8a6f8 (diff)
downloadxv6-labs-95692c4a8cf38765bac15b05d7a898e4ac8946e8.tar.gz
xv6-labs-95692c4a8cf38765bac15b05d7a898e4ac8946e8.tar.bz2
xv6-labs-95692c4a8cf38765bac15b05d7a898e4ac8946e8.zip
Remove left-over from some logging plan making complete syscalls atomic
0 is not a system call (thanks to Peter Froehlich)
-rw-r--r--syscall.c4
-rw-r--r--syscall.h1
2 files changed, 1 insertions, 4 deletions
diff --git a/syscall.c b/syscall.c
index 45f758e..799ebc2 100644
--- a/syscall.c
+++ b/syscall.c
@@ -129,9 +129,7 @@ syscall(void)
int num;
num = proc->tf->eax;
- if(num >= 0 && num < SYS_open && syscalls[num]) {
- proc->tf->eax = syscalls[num]();
- } else if (num >= SYS_open && num < NELEM(syscalls) && syscalls[num]) {
+ if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
proc->tf->eax = syscalls[num]();
} else {
cprintf("%d %s: unknown sys call %d\n",
diff --git a/syscall.h b/syscall.h
index 59a4576..bc5f356 100644
--- a/syscall.h
+++ b/syscall.h
@@ -13,7 +13,6 @@
#define SYS_sbrk 12
#define SYS_sleep 13
#define SYS_uptime 14
-
#define SYS_open 15
#define SYS_write 16
#define SYS_mknod 17