[PATCH 1/3] eal: add rte control thread create API
Tyler Retzlaff
roretzla at linux.microsoft.com
Tue Dec 6 18:35:14 CET 2022
On Mon, Dec 05, 2022 at 01:11:16PM -0800, Stephen Hemminger wrote:
> On Mon, 5 Dec 2022 12:24:26 -0800
> Tyler Retzlaff <roretzla at linux.microsoft.com> wrote:
>
> > Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> > ---
> > lib/eal/common/eal_common_thread.c | 93 ++++++++++++++++++++++++++++++++++----
> > lib/eal/include/rte_thread.h | 29 ++++++++++++
> > lib/eal/version.map | 3 ++
> > 3 files changed, 117 insertions(+), 8 deletions(-)
> >
> > diff --git a/lib/eal/common/eal_common_thread.c b/lib/eal/common/eal_common_thread.c
> > index c5d8b43..ca85c51 100644
> > --- a/lib/eal/common/eal_common_thread.c
> > +++ b/lib/eal/common/eal_common_thread.c
> > @@ -234,7 +234,10 @@ enum __rte_ctrl_thread_status {
> > };
> >
> > struct rte_thread_ctrl_params {
> > - void *(*start_routine)(void *);
> > + union {
> > + void * (*start_routine)(void *);
> > + rte_thread_func thread_func;
> > + } u;
>
> Why not just use rte_thread_func, this in internal.
I'm not sure i completely understand your comment here. The main reason
for using a union is to avoid dealing with casting. Later when the
rte_ctrl_thread_create is deprecated the union will be discarded.
No change was made in v2 but if you still think this should be addressed
let me know.
More information about the dev
mailing list