This commit is contained in:
oscar 2023-03-03 17:19:19 -05:00
parent d1c51ffc66
commit 8c8d701b47
2 changed files with 3 additions and 25 deletions

View File

@ -9,7 +9,7 @@
#define S2NS (1000000000UL)
static inline uint64_t
get_uptime()
get_uptime(void)
{
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
@ -38,7 +38,7 @@ void test(const char * case_name, struct timespec * ts)
printf("%s: clock_gettime(): %lu, topo_uptime_ns(): %lu, %% diff: %.2f%%\n", case_name, slow, fast, ((float)fast - (float)slow) / (float)slow * 100);
}
int ts_test()
int ts_test(void)
{
struct timespec ts;
// 1s
@ -94,7 +94,7 @@ int ts_test()
return 0;
}
int main()
int main(void)
{
topo_init(1);
topo_init(1);

22
topo.c
View File

@ -408,7 +408,6 @@ desc_init(struct topo_desc * desc, int verbose)
//
// public APIs
//
#ifdef __amd64__
int
topo_num_core(void)
{
@ -427,27 +426,6 @@ topo_core_to_numa(int coreid)
return g_default_desc.core_to_numa_lookup[coreid];
}
#else
int
topo_num_core(void)
{
return 176;
}
int
topo_num_numa(void)
{
return 2;
}
int
topo_core_to_numa(int coreid)
{
return coreid >= 88;
}
#endif
void
topo_destroy(void)
{