Subject: Re: MP interface: iterating over CPU's..
To: None <sommerfeld@orchard.arlington.ma.us>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-ports
Date: 09/24/2000 00:19:48
<sommerfeld@orchard.arlington.ma.us> (Bill Sommerfeld) writes:

> I'd like an abstract iterator interface, so that ports can either use
> a dense array or a linked list depending on what makes sense..
> 
> {
> 	struct cpu_info *ci;
> 	CPU_INFO_ITERATOR cii;
> 	int i;
> 
> 	for (CPU_INFO_ITERATE(cii, ci)) {

The naming convention used by the list macros in the kernel is along
the lines of LIST_FOREACH(var, head, next), so I would say that
CPU_INFO_FOREACH might be a more consistent name.

        - Nathan