MHAA Interrupt Control Core
v1.0.0
Interrupt gate control and scoped restoration
Toggle main menu visibility
Loading...
Searching...
No Matches
scoped_disable.hpp
Go to the documentation of this file.
1
#ifndef MHAA_INTERRUPT_SCOPED_DISABLE_HPP
2
#define MHAA_INTERRUPT_SCOPED_DISABLE_HPP
3
4
#include <interrupt/mask_control.hpp>
5
6
namespace
mhaa
7
{
8
namespace
interrupt
9
{
11
class
ScopedDisable
12
{
13
public
:
14
explicit
ScopedDisable
(MaskControl &control) noexcept
15
: control_(control), was_enabled_(control.save_and_disable()) {}
16
17
~ScopedDisable
() { control_.restore(was_enabled_); }
18
19
ScopedDisable
(
const
ScopedDisable
&) =
delete
;
20
ScopedDisable
&
operator=
(
const
ScopedDisable
&) =
delete
;
21
22
private
:
23
MaskControl &control_;
24
const
bool
was_enabled_;
25
};
26
}
27
}
28
29
#endif
mhaa::interrupt::ScopedDisable::ScopedDisable
ScopedDisable(const ScopedDisable &)=delete
mhaa::interrupt::ScopedDisable::operator=
ScopedDisable & operator=(const ScopedDisable &)=delete
mhaa::interrupt::ScopedDisable::~ScopedDisable
~ScopedDisable()
Definition
scoped_disable.hpp:17
mhaa::interrupt::ScopedDisable::ScopedDisable
ScopedDisable(MaskControl &control) noexcept
Definition
scoped_disable.hpp:14
mhaa::interrupt
Definition
interrupt.hpp:9
mhaa
Definition
interrupt.hpp:7
include
interrupt
scoped_disable.hpp
Generated by
1.18.0