libtopo/inc/topo.h

37 lines
449 B
C
Raw Permalink Normal View History

2022-05-26 16:25:30 +00:00
#pragma once
#include <stdio.h>
2022-05-26 18:46:56 +00:00
#include <stdint.h>
2022-06-14 18:07:55 +00:00
#include <sys/param.h>
2022-05-26 16:25:30 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2022-06-14 18:07:55 +00:00
#if __FreeBSD_version < 1301000
#error libbsdtopo only works on FreeBSD 13.1 and later
#endif
2022-05-26 20:18:49 +00:00
struct topo_desc;
2022-05-26 16:25:30 +00:00
int
2022-06-09 16:36:36 +00:00
topo_num_core(void);
2022-05-26 16:25:30 +00:00
int
2022-06-09 16:36:36 +00:00
topo_num_numa(void);
2022-05-26 16:25:30 +00:00
int
topo_core_to_numa(int coreid);
void
2022-06-09 16:36:36 +00:00
topo_destroy(void);
2022-05-26 16:25:30 +00:00
int
2022-06-10 11:29:01 +00:00
topo_init(int verbose);
2022-05-26 16:25:30 +00:00
uint64_t
2022-06-10 11:29:01 +00:00
topo_uptime_ns(void);
2022-05-26 16:25:30 +00:00
#ifdef __cplusplus
} // extern "C"
#endif