vdpa/mlx5: replace pthread functions unavailable in musl
authorThomas Monjalon <thomas@monjalon.net>
Wed, 24 Feb 2021 23:05:10 +0000 (00:05 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 23 Mar 2021 07:41:05 +0000 (08:41 +0100)
commit41b5a7a8494ea62438152f332081e826def89469
tree3f09c7a3a505a4507185584e6000962cc3ab6128
parentf17c5d7abd91a4c70a8ca82f885e2f930980d22d
vdpa/mlx5: replace pthread functions unavailable in musl

1/ The function pthread_yield() does not exist in musl libc,
and can be replaced with sched_yield() after including sched.h.

2/ The function pthread_attr_setaffinity_np() does not exist in musl libc,
and can be replaced with pthread_setaffinity_np() after pthread_create().

Fixes: b7fa0bf4d5c6 ("vdpa/mlx5: fix polling threads scheduling")
Fixes: 5cf3fd3af4df ("vdpa/mlx5: add CPU core parameter to bind polling thread")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@nvidia.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
drivers/vdpa/mlx5/mlx5_vdpa_event.c