kernel: add functions to query the number of available/online CPUs

This commit is contained in:
2023-05-05 15:25:44 +01:00
parent 2ca1bd0b06
commit cec6b644ac
2 changed files with 13 additions and 0 deletions

View File

@@ -39,6 +39,9 @@ extern bool cpu_is_online(unsigned int cpu_id);
extern void cpu_set_available(unsigned int cpu_id);
extern void cpu_set_online(unsigned int cpu_id);
extern unsigned int cpu_nr_available(void);
extern unsigned int cpu_nr_online(void);
extern cycles_t get_cycles(void);
static inline cycles_t cycles_diff(cycles_t then, cycles_t now)
{