mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-30 13:24:27 +01:00
fix wfe_ldxr_* examples with sevl to make things more hardware independant
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user