svn commit: r209119 - head/sys/sys

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Jun 14 08:18:39 UTC 2010


On Mon, Jun 14, 2010 at 11:52:49AM +1000, Lawrence Stewart wrote:
> Given that the DPCPU variable name space is flat and variable names have 
> to be unique, perhaps something like the following would address the 
> concerns raised?
> 
> #define DPCPU_SUM(n, var, sum)                                         \
> do {                                                                   \
>         u_int _##n##_i;                                                \
>         (sum) = 0;                                                     \
>         CPU_FOREACH(_##n##_i)                                          \
>                 (sum) += (DPCPU_ID_PTR(_##n##_i, n))->var;             \
> } while (0)

Looks ok to me. Thanks.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20100614/0a169f10/attachment.pgp


More information about the svn-src-head mailing list