[PATCH 05/11] eal: force prefix for internal threads
David Marchand
david.marchand at redhat.com
Thu Sep 7 10:53:57 CEST 2023
On Thu, Sep 7, 2023 at 10:50 AM Morten Brørup <mb at 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
More information about the dev
mailing list