This commit is contained in:
Simon
2025-07-13 16:34:52 +02:00
parent 68cb30210f
commit 42f2dd6028
4 changed files with 32 additions and 4 deletions

View File

@@ -24,9 +24,11 @@ Vault::Vault() {
Guarded::~Guarded() { Guard::leave(); }
Guarded Guard::enter() {
bool status = Core::Interrupt::disable();
epi_flag FOR_CURRENT_CORE = true;
//Core::Interrupt::enable();
Core::Interrupt::restore(status);
global_lock.lock();
return Guarded(global_vault);
}

View File

@@ -18,6 +18,7 @@ struct Vault {
// no copy
Vault(const Vault&) = delete;
Vault& operator=(const Vault&) = delete;
uint8_t counter;
};
/*! \brief Lock guard that provides access to the epilogue \ref Vault