]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add helper macros to iterate over available CPUs in the system.
authorjhb <jhb@FreeBSD.org>
Fri, 11 Jun 2010 15:56:18 +0000 (15:56 +0000)
committerjhb <jhb@FreeBSD.org>
Fri, 11 Jun 2010 15:56:18 +0000 (15:56 +0000)
commitab25f8e13afd25fa86f75b8f51724e49ab9d83e8
treee699e8a92c3bc44d9fcd215e07c348dacb906644
parent6a3535c3fa18af41cdca53d39cc5cfa30c33b489
Add helper macros to iterate over available CPUs in the system.
CPU_FOREACH(i) iterates over the CPU IDs of all available CPUs.  The
CPU_FIRST() and CPU_NEXT(i) macros can also be used to iterate over
available CPU IDs.  CPU_NEXT(i) wraps around to CPU_FIRST() rather than
returning some sort of terminator.

Requested by: rwatson
Reviewed by: attilio
sys/sys/smp.h