[dpdk-dev] [PATCH v14 9/9] Add unit tests for thread API
Dmitry Kozlyuk
dmitry.kozliuk at gmail.com
Fri Aug 20 18:54:19 CEST 2021
2021-08-20 09:10 (UTC-0700), Narcisa Ana Maria Vasile:
> On Thu, Aug 19, 2021 at 02:31:34PM -0700, Narcisa Ana Maria Vasile wrote:
> > From: Narcisa Vasile <navasile at microsoft.com>
> >
> > As a new API for threading is introduced,
> > a set of unit tests have been added to test the new interface.
> >
> > Signed-off-by: Narcisa Vasile <navasile at microsoft.com>
> > ---
> > app/test/meson.build | 2 +
> > app/test/test_threads.c | 419 ++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 421 insertions(+)
> > create mode 100644 app/test/test_threads.c
> >
>
> There's a failure here on Alpine Linux:
> "error: implicit declaration of function 'pthread_attr_setaffinity_np';
> did you mean 'pthread_setaffinity_np'? [-Werror=implicit-function-declaration]"
>
> It looks like "pthread_attr_setaffinity_np" is not available on Alpine Linux. However,
> other affinity functions such as "pthread_setaffinity_np" are present. Is there a guard that
> I can use here to check if the pthread_*_np functions are available, similar to RTE_HAS_CPUSET for cpuset?
Even if there is one, you still need to handle the Alpine case.
41b5a7a8494e ("vdpa/mlx5: replace pthread functions unavailable in musl")
is an example how to solve this particular case.
It's also what that rte_ctrl_thread_create() does.
More information about the dev
mailing list