blob: f4e3aa85e7dfd3a4d7af137ae88f07001cebca5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef SMP_INCLUDED
#define SMP_INCLUDED
#include <stdint.h>
void smp_boot();
extern uint8_t corecount;
static inline void lock(uint8_t *lock) {
asm("mov al, 1\n"
"spinlock:\n"
"lock xchgb [%0], al\n"
"test al, al\n"
"pause\n"
"jnz spinlock\n"
::"r"(lock):"al");
}
static inline void unlock(uint8_t *lock) {
asm("lock andb [%0], 0"::"r"(lock));
}
static inline void waitup(uint8_t *loto) {
}
#define CREATE_LOTO(name)
#endif
|