@@ -16,7 +16,7 @@
#define GIGA 1000000000
-uint64_t odp_time_cycles(void)
+uint64_t odp_time_counts(void)
{
struct timespec time;
uint64_t sec, ns, hz, cycles;
@@ -8,7 +8,7 @@
#include <odp/hints.h>
#include <odp/system_info.h>
-uint64_t odp_time_cycles(void)
+uint64_t odp_time_counts(void)
{
#define CVMX_TMP_STR(x) CVMX_TMP_STR2(x)
#define CVMX_TMP_STR2(x) #x
@@ -5,7 +5,7 @@
*/
#include <odp/time.h>
-uint64_t odp_time_cycles(void)
+uint64_t odp_time_counts(void)
{
union {
uint64_t tsc_64;
@@ -528,12 +528,12 @@ static int schedule_loop(odp_queue_t *out_queue, uint64_t wait,
break;
if (start_cycle == 0) {
- start_cycle = odp_time_cycles();
+ start_cycle = odp_time_counts();
continue;
}
- cycle = odp_time_cycles();
- diff = odp_time_diff_cycles(start_cycle, cycle);
+ cycle = odp_time_counts();
+ diff = odp_time_diff_counts(start_cycle, cycle);
if (wait < diff)
break;
@@ -579,7 +579,7 @@ uint64_t odp_schedule_wait_time(uint64_t ns)
if (ns <= ODP_SCHED_NO_WAIT)
ns = ODP_SCHED_NO_WAIT + 1;
- return odp_time_ns_to_cycles(ns);
+ return odp_time_ns_to_counts(ns);
}
@@ -12,7 +12,7 @@
#define GIGA 1000000000
-uint64_t odp_time_diff_cycles(uint64_t t1, uint64_t t2)
+uint64_t odp_time_diff_counts(uint64_t t1, uint64_t t2)
{
if (odp_likely(t2 > t1))
return t2 - t1;
@@ -20,7 +20,7 @@ uint64_t odp_time_diff_cycles(uint64_t t1, uint64_t t2)
return t2 + (UINT64_MAX - t1);
}
-uint64_t odp_time_cycles_to_ns(uint64_t cycles)
+uint64_t odp_time_counts_to_ns(uint64_t cycles)
{
uint64_t hz = odp_sys_cpu_hz();
@@ -31,7 +31,7 @@ uint64_t odp_time_cycles_to_ns(uint64_t cycles)
}
-uint64_t odp_time_ns_to_cycles(uint64_t ns)
+uint64_t odp_time_ns_to_counts(uint64_t ns)
{
uint64_t hz = odp_sys_cpu_hz();
The time API were changed from *_cycles* to *_counts*, so use appropriate names. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- platform/linux-generic/arch/linux/odp_time.c | 2 +- platform/linux-generic/arch/mips64/odp_time.c | 2 +- platform/linux-generic/arch/x86/odp_time.c | 2 +- platform/linux-generic/odp_schedule.c | 8 ++++---- platform/linux-generic/odp_time.c | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-)