wip: topology on init/find.

This commit is contained in:
Alastair Poole 2021-05-17 16:19:44 +01:00
parent de06a87b4d
commit 805c95a9cc
3 changed files with 4 additions and 5 deletions

View File

@ -20,10 +20,9 @@ test(void)
printf("total: %i online %i\n", cores_count(), cores_online_count());
cores = cores_find();
cores_topology(cores);
for (int i = 0; i < 10; i++)
{
cores_check(cores);
cores_update(cores);
EINA_LIST_FOREACH(cores, l, core)
{
printf("core %i = %1.2f%%\t%1.2fMHz %iC\n", core->id, core->percent,

View File

@ -121,7 +121,7 @@ Eina_List *
cores_find(void);
void
cores_check(Eina_List *cores);
cores_update(Eina_List *cores);
int
cores_count(void);
@ -147,5 +147,4 @@ cores_temperature_min_max(int *min, int *max);
int
cores_frequency_min_max(int *min, int *max);
#endif

View File

@ -66,7 +66,7 @@ cores_online_count(void)
}
void
cores_check(Eina_List *cores)
cores_update(Eina_List *cores)
{
int diff_total, diff_idle;
double ratio, percent;
@ -248,6 +248,7 @@ cores_find(void)
core->id = i;
cores = eina_list_append(cores, core);
}
cores_topology(cores);
return cores;
}