[dpdk-dev] [PATCH v3] eal/windows: fix invalid thread handle

Thomas Monjalon thomas at monjalon.net
Tue Jun 16 21:17:27 CEST 2020


16/06/2020 20:53, Tasnim Bashar:
> > From: Thomas Monjalon <thomas at monjalon.net>
> > 02/06/2020 04:00, Tasnim Bashar:
> > > Casting thread ID to handle is not accurate way to get thread handle.
> > > Need to use OpenThread function to get thread handle from thread ID.
> > >
> > > pthread_setaffinity_np and pthread_getaffinity_np functions for
> > > Windows are affected because of it.
> > >
> > > Signed-off-by: Tasnim Bashar <tbashar at mellanox.com>
> > > ---
> > > v3: WA to remove warning(-Wmaybe-uninitialized)
> > 
> > The -Wmaybe-uninitialized warning was there before this patch.
> > Shouldn't it be a separate patch before this one?
> 
> The warning appeared only on this patch, so we don't need to separate it

I can see the warning on the main repo when cross-compiling with MinGW on Linux.

[...]
> > > +	memset(cpuset, 0, sizeof(rte_cpuset_t));
> > 
> > Shouldn't we use RTE_CPU_ZERO instead of memset?
>
> If we use CPU_ZERO or CPU_SET, we still get the same warning!

That's strange. Does it mean CPU_ZERO is broken in 
lib/librte_eal/windows/include/sched.h ?




More information about the dev mailing list