Re: [PATCH][1/2] SquashFS

From: Junio C Hamano
Date: Tue Mar 15 2005 - 20:51:49 EST


>>>>> "PJ" == Paul Jackson <pj@xxxxxxxxxxxx> writes:

PJ> There is not a concensus (nor a King Penguin dictate) between the
PJ> "while(1)" and "for(;;)" style to document.

FWIW, linux-0.01 has four uses of "while (1)" and two uses of
"for (;;)" ;-).

./fs/inode.c: while (1) {
./fs/namei.c: while (1) {
./fs/namei.c: while (1) {
./kernel/sched.c: while (1) {

./init/main.c: for(;;) pause();
./kernel/panic.c: for(;;);

What is interesting here is that the King Penguin used these two
constructs with consistency. The "while (1)" form was used with
normal exit routes with "if (...) break" inside; while the
"for(;;)" form was used only in unusual "the thread of control
should get stuck here forever" cases.

So, Phillip's decision to go back to his original while(1) style
seems to be in line with the style used in the original Linux
kernel ;-).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/