Hey Petri, I think it needs to be there at least the way I am currently
using it.  You begin the process by calling "odp_cpumask_first" to get
your starting CPU, and the "next" function is the continuation.  So 
the CPU number passed into the function is assumed to be the previously
set CPU, and we are searching for the next one.  So the "+1" is necessary
to skip over the CPU passed in (else you would just keep finding the 
same CPU).

If you wanted to only use "odp_cpumask_next", I think it could be
done with passing in "-1" as the CPU to indicate start versus 
continuation.

Hope this makes sense.

> +int odp_cpumask_next(const odp_cpumask_t *mask, int cpu)
> +{
> +     for (cpu += 1; cpu < CPU_SETSIZE; cpu++)


First valid cpu ID is 0. So, "cpu += 1" should not be there, right?

-Petri


> +             if (odp_cpumask_isset(mask, cpu))
> +                     return cpu;
> +     return -1;
> +}
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to