NJU-ProjectN/abstract-machine 3348db971fd860be5cb28e21c18f9d0e65d0c96a Merge pull request #8 from Jasonyanyusong/master
20 lines
293 B
C
20 lines
293 B
C
#include <am.h>
|
|
#include <stdatomic.h>
|
|
#include <klib-macros.h>
|
|
|
|
bool mpe_init(void (*entry)()) {
|
|
entry();
|
|
panic("MPE entry returns");
|
|
}
|
|
|
|
int cpu_count() {
|
|
return 1;
|
|
}
|
|
|
|
int cpu_current() {
|
|
return 0;
|
|
}
|
|
|
|
int atomic_xchg(int *addr, int newval) {
|
|
return atomic_exchange(addr, newval);
|
|
}
|