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 p...@freebsd.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!
pgpkwrwnO7xqF.pgp
Description: PGP signature