diff --git a/minimal_heap.h b/minimal_heap.h index 8172c10..70ad352 100644 --- a/minimal_heap.h +++ b/minimal_heap.h @@ -25,7 +25,7 @@ #endif #ifndef MIHP_HEAP_LOCK_TYPE - #define MIHP_HEAP_LOCK_TYPE bool // Does NOT have to be reentred safe + #define MIHP_HEAP_LOCK_TYPE volatile bool // Does NOT have to be reentred safe #define MIHP_LOCK_HEAP(LockVarPtr) { while (*(LockVarPtr)) {}; *(LockVarPtr) = true; } #define MIHP_UNLOCK_HEAP(LockVarPtr) { *(LockVarPtr) = false; } #endif