xref: /kvm-unit-tests/lib/x86/smp.h (revision 7d36db351752e29ad27eaafe3f102de7064e429b)
1 #ifndef __SMP_H
2 #define __SMP_H
3 
4 struct spinlock {
5     int v;
6 };
7 
8 void smp_init(void);
9 
10 int cpu_count(void);
11 int smp_id(void);
12 void on_cpu(int cpu, void (*function)(void *data), void *data);
13 void on_cpu_async(int cpu, void (*function)(void *data), void *data);
14 void spin_lock(struct spinlock *lock);
15 void spin_unlock(struct spinlock *lock);
16 
17 #endif
18