Skip to content

Commit

Permalink
Remove left-over from some logging plan making complete syscalls atomic
Browse files Browse the repository at this point in the history
0 is not a system call (thanks to Peter Froehlich)
  • Loading branch information
kaashoek committed Aug 23, 2012
1 parent 432acba commit 95692c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions syscall.c
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion syscall.h
Expand Up @@ -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
Expand Down

0 comments on commit 95692c4

Please sign in to comment.