> From: Thomas Monjalon <tho...@monjalon.net> > 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?
Some functions take more inputs and some take less, that's why we used #define. But it is possible to implement them without #define, naming the functions with the final pthread standard name. However, it will be better to change it in a different commit.