@@ -8,7 +8,7 @@
#include <odp_debug_internal.h>
#include <string.h>
-int odp_cpuinfo_parser(FILE *file ODP_UNUSED, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file ODP_UNUSED, system_info_t *sysinfo)
{
int i;
@@ -7,7 +7,7 @@
#include <odp_internal.h>
#include <string.h>
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo)
{
char str[1024];
char *pos;
@@ -7,7 +7,7 @@
#include <odp_internal.h>
#include <string.h>
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo)
{
char str[1024];
char *pos;
@@ -7,7 +7,7 @@
#include <odp_internal.h>
#include <string.h>
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo)
{
char str[1024];
char *pos;
@@ -30,19 +30,19 @@ extern __thread int __odp_errno;
typedef struct {
uint64_t cpu_hz_max[MAX_CPU_NUMBER];
- uint64_t huge_page_size;
+ uint64_t default_huge_page_size;
uint64_t page_size;
int cache_line_size;
int cpu_count;
char cpu_arch_str[128];
char model_str[MAX_CPU_NUMBER][128];
-} odp_system_info_t;
+} system_info_t;
struct odp_global_data_s {
pid_t main_pid;
odp_log_func_t log_fn;
odp_abort_func_t abort_fn;
- odp_system_info_t system_info;
+ system_info_t system_info;
odp_cpumask_t control_cpus;
odp_cpumask_t worker_cpus;
int num_cpus_installed;
@@ -126,7 +126,7 @@ int _odp_int_name_tbl_term_global(void);
void _odp_flush_caches(void);
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo);
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo);
uint64_t odp_cpu_hz_current(int id);
#ifdef __cplusplus
@@ -98,7 +98,7 @@ static uint64_t default_huge_page_size(void)
/*
* Analysis of /sys/devices/system/cpu/ files
*/
-static int systemcpu(odp_system_info_t *sysinfo)
+static int systemcpu(system_info_t *sysinfo)
{
int ret;
@@ -124,7 +124,7 @@ static int systemcpu(odp_system_info_t *sysinfo)
return -1;
}
- sysinfo->huge_page_size = default_huge_page_size();
+ sysinfo->default_huge_page_size = default_huge_page_size();
return 0;
}
@@ -137,7 +137,7 @@ int odp_system_info_init(void)
{
FILE *file;
- memset(&odp_global_data.system_info, 0, sizeof(odp_system_info_t));
+ memset(&odp_global_data.system_info, 0, sizeof(system_info_t));
odp_global_data.system_info.page_size = ODP_PAGE_SIZE;
@@ -147,7 +147,7 @@ int odp_system_info_init(void)
return -1;
}
- odp_cpuinfo_parser(file, &odp_global_data.system_info);
+ cpuinfo_parser(file, &odp_global_data.system_info);
fclose(file);
@@ -199,7 +199,7 @@ uint64_t odp_cpu_hz_max_id(int id)
uint64_t odp_sys_huge_page_size(void)
{
- return odp_global_data.system_info.huge_page_size;
+ return odp_global_data.system_info.default_huge_page_size;
}
uint64_t odp_sys_page_size(void)
A little bit code clean up to drop odp_ prefix from internal things and rename huge_pages to default_huge_pages internal struct. Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- platform/linux-generic/arch/default/odp_sysinfo_parse.c | 2 +- platform/linux-generic/arch/mips64/odp_sysinfo_parse.c | 2 +- platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c | 2 +- platform/linux-generic/arch/x86/odp_sysinfo_parse.c | 2 +- platform/linux-generic/include/odp_internal.h | 8 ++++---- platform/linux-generic/odp_system_info.c | 10 +++++----- 6 files changed, 13 insertions(+), 13 deletions(-)