lkml.org 
[lkml]   [2002]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] for_each_zone / for_each_pgdat
On Tue, 16 Apr 2002, Rik van Riel wrote:

> On Tue, 16 Apr 2002, Oliver Xymoron wrote:
> > On Mon, 15 Apr 2002, Linus Torvalds wrote:
> > > On Mon, 15 Apr 2002, Linus Torvalds wrote:
> > > >
> > > > Which requires the user to use something like
> > > >
> > > > for_each_zone(zone) {
> > > > ...
> > > > } end_zone;
>
> > Ugh. If we're going to use such ugly things, it would be nice if they were
> > do_zone/while_zone instead of being suggestive of a for loop.
>
> Ummm, it _is_ a for loop.

Conceptually, sure, but the underlying macros Linus suggested made it
do/while. As the do/while form is the only control structure in C where we
have something that looks like an expression after a block, naming it for_
seems terribly incongruous. Naming it do_/while_ would make it slightly
less ugly, at least to my eyes, and serve to remind that both parts are
essential.

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."

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

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.095 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site