[dpdk-dev] [dpdk-stable] [PATCH 1/2] examples/performance-thread: fix FreeBSD compilation

Thomas Monjalon thomas at monjalon.net
Thu Apr 20 19:33:20 CEST 2017

20/04/2017 18:32, Bruce Richardson:
> This set of sample apps did not compile on FreeBSD due to use of a number
> of Linux/glibc-specific APIs, or APIs which existed in different headers
> on FreeBSD. Specifically, the following APIs has problems:
>   * sched_getcpu() is a glibc extension
>   * pthread_yield() returns int on Linux, but void on FreeBSD
>   * APIs for managing cpu affinity are in pthread_np.h on FreeBSD, rather
>     than in pthread.h
>   * the type for managing cpu sets is cpuset_t on FreeBSD rather than
>     cpu_set_t as on Linux.

It can be fixed by using rte_cpuset_t defined in

More information about the dev mailing list