skullc-peripherals/Utility/Inc/utility_atomicscopeguard.hpp
Erki faa1685e18
All checks were successful
continuous-integration/drone/push Build is passing
Add async UART logger (running on DMA).
2021-03-21 17:03:06 +02:00

32 lines
532 B
C++

/*
* utility_atomicscopeguard.hpp
*
* Created on: Mar 21, 2021
* Author: erki
*/
#ifndef UTILITY_INC_UTILITY_ATOMICSCOPEGUARD_HPP_
#define UTILITY_INC_UTILITY_ATOMICSCOPEGUARD_HPP_
#include <cstdint>
namespace Utility
{
class AtomicScopeGuard
{
public:
AtomicScopeGuard();
AtomicScopeGuard(const AtomicScopeGuard&) = delete;
AtomicScopeGuard(AtomicScopeGuard&&) = delete;
~AtomicScopeGuard();
private:
static std::int32_t _reentrancy_counter;
};
}
#endif /* UTILITY_INC_UTILITY_ATOMICSCOPEGUARD_HPP_ */