xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit db8fb62e4d599f4e08a3b6420e42b2445e8d7fe3
parent 236d33698b4520f8722e5ff8ce2c5d277c6b7153
Author: rsc <rsc>
Date:   Wed,  6 Sep 2006 18:47:51 +0000

for vs while

Diffstat:
Mbio.c | 2+-
Mbootmain.c | 2+-
Mfs.c | 2+-
Minit.c | 2+-
Msyscall.c | 2+-
5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/bio.c b/bio.c @@ -39,7 +39,7 @@ getblk(uint dev, uint sector) acquire(&buf_table_lock); - while(1){ + for(;;){ for(b = bufhead.next; b != &bufhead; b = b->next) if((b->flags & (B_BUSY|B_VALID)) && b->dev == dev && b->sector == sector) break; diff --git a/bootmain.c b/bootmain.c @@ -58,7 +58,7 @@ cmain(void) bad: outw(0x8A00, 0x8A00); outw(0x8A00, 0x8E00); - while(1) + for(;;) ; } diff --git a/fs.c b/fs.c @@ -479,7 +479,7 @@ namei(char *path, int mode, uint *ret_off, char **ret_last, struct inode **ret_i while(*cp == '/') cp++; - while(1){ + for(;;){ if(*cp == '\0'){ if(mode == NAMEI_LOOKUP) return dp; diff --git a/init.c b/init.c @@ -20,7 +20,7 @@ main(void) dup(0); dup(0); - while(1){ + for(;;){ pid = fork(); if(pid < 0){ puts("init: fork failed\n"); diff --git a/syscall.c b/syscall.c @@ -62,7 +62,7 @@ checkstring(uint s) char c; int len = 0; - while(1){ + for(;;){ if(fetchbyte(curproc[cpu()], s, &c) < 0) return -1; if(c == '\0')