This commit is contained in:
Simon
2025-07-14 16:46:33 +02:00
parent 9d525a9602
commit 6951311c9c
4 changed files with 34 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
#include "guard.h"
#include "../arch/core.h"
#include "../debug/output.h"
#include "../object/bbuffer.h"
@@ -28,7 +27,7 @@ Guarded Guard::enter() {
epi_flag FOR_CURRENT_CORE = true;
Core::Interrupt::restore(status);
global_lock.lock();
Bellringer bellringer;
return Guarded(global_vault);
}

View File

@@ -3,6 +3,7 @@
*/
//#pragma once
#include "sync/bellringer.h"
#include "../object/bbuffer.h"
#include "../object/key.h"
#include "../types.h"
@@ -19,6 +20,8 @@ struct Vault {
Vault(const Vault&) = delete;
Vault& operator=(const Vault&) = delete;
uint8_t counter;
Bellringer bellringer;
};
/*! \brief Lock guard that provides access to the epilogue \ref Vault