Agreed. Again, this was just a rebase of Barry's earlier patch that predated that routine. I can post a follow-on patch to address this.
On Thu, Feb 18, 2016 at 6:52 AM, Maxim Uvarov <maxim.uva...@linaro.org> wrote: > On 02/18/16 05:03, Bill Fischofer wrote: > >> +static void busy_wait(uint64_t nanoseconds) >> +{ >> + odp_time_t start_time, end_time; >> + uint32_t cnt; >> + >> + start_time = odp_time_local(); >> + end_time = odp_time_sum(start_time, >> + odp_time_local_from_ns(nanoseconds)); >> + >> + while (odp_time_cmp(odp_time_local(), end_time) < 0) >> + for (cnt = 1; cnt <= 10; cnt++) >> + busy_wait_counter++; >> +} >> > incrementing cnt looks like hack. I think odp_cpu_pause() can be used here. > > Maxim. > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp