File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 21
21
22
22
#include <stdbool.h>
23
23
24
- static volatile bool critical_interrupts_enabled = false;
25
- static volatile bool state_saved = false;
24
+ static bool critical_interrupts_enabled = false;
25
+ static bool state_saved = false;
26
26
27
27
static bool are_interrupts_enabled (void )
28
28
{
Original file line number Diff line number Diff line change 43
43
#endif
44
44
#endif
45
45
46
- static volatile uint32_t critical_section_reentrancy_counter = 0 ;
46
+ static uint32_t critical_section_reentrancy_counter = 0 ;
47
47
48
48
bool core_util_are_interrupts_enabled (void )
49
49
{
@@ -77,11 +77,11 @@ bool core_util_in_critical_section(void)
77
77
78
78
void core_util_critical_section_enter (void )
79
79
{
80
+ hal_critical_section_enter ();
81
+
80
82
// If the reentrancy counter overflows something has gone badly wrong.
81
83
MBED_ASSERT (critical_section_reentrancy_counter < UINT32_MAX );
82
84
83
- hal_critical_section_enter ();
84
-
85
85
++ critical_section_reentrancy_counter ;
86
86
}
87
87
You can’t perform that action at this time.
0 commit comments