fix wfe_ldxr_* examples with sevl to make things more hardware independant

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2020-01-13 00:00:00 +00:00
parent 3b3f073e2c
commit cc1d34f862
3 changed files with 4 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ std::atomic_ulong done;
int futex = 1;
void myfunc() {
__asm__ __volatile__ ("ldxr x0, [%0];wfe;wfe" : : "r" (&futex) : "x0");
__asm__ __volatile__ ("sevl;wfe;ldxr x0, [%0];wfe" : : "r" (&futex) : "x0");
done.store(futex);
}