diff mbox

[API-NEXT,3/4] linux-generic: use appropriate time API with count instead of cycles

Message ID 1438808473-26968-4-git-send-email-ivan.khoronzhuk@linaro.org
State New
Headers show

Commit Message

Ivan Khoronzhuk Aug. 5, 2015, 9:01 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/platform/linux-generic/arch/linux/odp_time.c b/platform/linux-generic/arch/linux/odp_time.c
index 4dc0764..f13b0ff 100644
--- a/platform/linux-generic/arch/linux/odp_time.c
+++ b/platform/linux-generic/arch/linux/odp_time.c
@@ -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;
diff --git a/platform/linux-generic/arch/mips64/odp_time.c b/platform/linux-generic/arch/mips64/odp_time.c
index 4fb790b..afc61b0 100644
--- a/platform/linux-generic/arch/mips64/odp_time.c
+++ b/platform/linux-generic/arch/mips64/odp_time.c
@@ -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
diff --git a/platform/linux-generic/arch/x86/odp_time.c b/platform/linux-generic/arch/x86/odp_time.c
index a111561..819b273 100644
--- a/platform/linux-generic/arch/x86/odp_time.c
+++ b/platform/linux-generic/arch/x86/odp_time.c
@@ -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;
diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index 5d32c81..fb60fc1 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -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);
 }
 
 
diff --git a/platform/linux-generic/odp_time.c b/platform/linux-generic/odp_time.c
index a08833d..c0678d6 100644
--- a/platform/linux-generic/odp_time.c
+++ b/platform/linux-generic/odp_time.c
@@ -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();