[PATCH v9 1/7] eal: add static per-lcore memory allocation facility
Morten Brørup
mb at smartsharesystems.com
Fri Oct 11 10:46:39 CEST 2024
> >> +/**
> >> + * Get pointer to lcore variable instance of the current thread.
> >> + *
> >> + * May only be used by EAL threads and registered non-EAL threads.
> >> + */
> >> +#define RTE_LCORE_VAR_VALUE(handle) \
> >
> > RTE_LCORE_VAR_LOCAL?
> >
>
> Why is that better?
>
> Maybe Morten can remind me here, but I think we had a discussion about
> RTE_LCORE_VAR() versus RTE_LCORE_VAR_VALUE() at some point, and
> RTE_LCORE_VAR_VALUE() was deemed more clear.
Yes, we had the discussion, and reached this conclusion.
However, having been away from it for awhile, and now coming back to it, I lean towards the shorter names, although they are not 100 % correct.
I am usually a proponent of (very) long - self-explanatory - variable names.
But in this case, brevity will be better for reviewing code using the library.
More information about the dev
mailing list