From: Hongbo Zhang <[email protected]> All CPU related APIs should be moved to cpu.h, this patch moves odp_sys_cpu_hz(), all the calling functions will be also updated in later patch.
Signed-off-by: Hongbo Zhang <[email protected]> --- include/odp/api/cpu.h | 9 +++++++++ include/odp/api/system_info.h | 7 ------- platform/linux-generic/odp_system_info.c | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/odp/api/cpu.h b/include/odp/api/cpu.h index 78c3ffc..b63a2e9 100644 --- a/include/odp/api/cpu.h +++ b/include/odp/api/cpu.h @@ -53,6 +53,15 @@ int odp_cpu_count(void); const char *odp_cpu_model_str(void); /** + * Current CPU frequency in Hz + * + * Returns current frequency of this CPU + * + * @return CPU frequency in Hz + */ +uint64_t odp_cpu_hz(void); + +/** * @} */ diff --git a/include/odp/api/system_info.h b/include/odp/api/system_info.h index 1cd883f..bde3a60 100644 --- a/include/odp/api/system_info.h +++ b/include/odp/api/system_info.h @@ -24,13 +24,6 @@ extern "C" { */ /** - * CPU frequency in Hz - * - * @return CPU frequency in Hz - */ -uint64_t odp_sys_cpu_hz(void); - -/** * Huge page size in bytes * * @return Huge page size in bytes diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c index ed6b515..8e903b0 100644 --- a/platform/linux-generic/odp_system_info.c +++ b/platform/linux-generic/odp_system_info.c @@ -374,7 +374,7 @@ int odp_system_info_init(void) * Public access functions ************************* */ -uint64_t odp_sys_cpu_hz(void) +uint64_t odp_cpu_hz(void) { return odp_global_data.system_info.cpu_hz[0]; } -- 1.9.1 _______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
