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

Thomas Monjalon thomas at monjalon.net
Mon Jun 15 11:42:04 CEST 2020


02/06/2020 04:00, Tasnim Bashar:
>  #define pthread_setaffinity_np(thread, size, cpuset) \
> -	eal_set_thread_affinity_mask(thread, (unsigned long *) cpuset)
> +	eal_set_thread_affinity_mask(thread, cpuset)
>  #define pthread_getaffinity_np(thread, size, cpuset) \
> -	eal_get_thread_affinity_mask(thread, (unsigned long *) cpuset)
> +	eal_get_thread_affinity_mask(thread, cpuset)
>  #define pthread_create(threadid, threadattr, threadfunc, args) \
>  	eal_create_thread(threadid, threadfunc, args)
>  
>  static inline int
> -eal_set_thread_affinity_mask(pthread_t threadid, unsigned long *cpuset)
> +eal_set_thread_affinity_mask(pthread_t threadid, rte_cpuset_t *cpuset)
[...]
>  static inline int
> -eal_get_thread_affinity_mask(pthread_t threadid, unsigned long *cpuset)
> +eal_get_thread_affinity_mask(pthread_t threadid, rte_cpuset_t *cpuset)

I don't understand the need for the #define.
Why not naming the functions with the final pthread standard name?




More information about the dev mailing list