Re: [dpdk-dev] [PATCH 1/2] eal: add API that sleeps while waiting for threads

2018-10-11 Thread Stephen Hemminger
On Thu, 11 Oct 2018 20:57:52 +0100 Ferruh Yigit wrote: > +/* > + * Wait until a lcore finished its job by sleeping. > + * Sleep time will be times of 'usec' > + */ > +int > +rte_eal_wait_lcore_sleep(unsigned slave_id, size_t usec) > +{ > + if (lcore_config[slave_id].state == WAIT) > +

[dpdk-dev] [PATCH 1/2] eal: add API that sleeps while waiting for threads

2018-10-11 Thread Ferruh Yigit
It is common that sample applications call rte_eal_wait_lcore() while waiting for worker threads to be terminated. Mostly master lcore keeps waiting in this function. The waiting app for termination is not a time critical task, app can prefer a sleep version of the waiting to consume less cycles.