kernel: add support for getting percpu variables that belong to other CPUs

This commit is contained in:
2023-05-04 21:42:51 +01:00
parent 3f91c96050
commit bb524c1576
6 changed files with 49 additions and 4 deletions

View File

@@ -30,8 +30,12 @@ struct cpu_data {
#define this_cpu() (ml_cpu_block_get_id(ml_this_cpu()))
extern struct cpu_data *get_this_cpu(void);
extern struct cpu_data *get_cpu(unsigned int id);
extern void put_cpu(struct cpu_data *cpu);
extern bool cpu_is_available(unsigned int cpu_id);
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);