On Thu, Sep 7, 2023 at 10:50 AM Morten Brørup <m...@smartsharesystems.com> 
wrote:
> > This 10 value in the comment is easy to miss if some change with the
> > prefix is done.
> > Mentionning RTE_THREAD_INTERNAL_NAME_SIZE is enough.
>
> I disagree with David's comment to this.
>
> The function documentation is easier to read if the actual number is also 
> mentioned.
>
> For the best of both worlds, you can add something like this nearby:
>
> _Static_assert(sizeof(RTE_THREAD_NAME_PREFIX) == sizeof("dpdk-"),
>                 "Length of RTE_THREAD_NAME_PREFIX has changed; "
>                 "the documentation needs updating.");

And how will it catch the comment about 10 characters ?


-- 
David Marchand

Reply via email to