]> Devi Nivas Git - cs3210-lab1.git/commitdiff
Remove left-over from some logging plan making complete syscalls atomic
authorFrans Kaashoek <kaashoek@mit.edu>
Thu, 23 Aug 2012 00:28:58 +0000 (20:28 -0400)
committerFrans Kaashoek <kaashoek@mit.edu>
Thu, 23 Aug 2012 00:28:58 +0000 (20:28 -0400)
0 is not a system call (thanks to Peter Froehlich)

syscall.c
syscall.h

index 45f758e54540a9220e529489a2ec241112d5aa37..799ebc2fa1ae5d7226ad4066881171de1907d061 100644 (file)
--- 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",
index 59a4576eda34f697dcc5be59e491cdd0ad6c3ced..bc5f35651c0e0e6d79e60a80b778962429832aeb 100644 (file)
--- 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