File tree Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -36,30 +36,17 @@ MBED_WEAK void hal_critical_section_enter(void)
36
36
{
37
37
critical_interrupts_enabled = are_interrupts_enabled ();
38
38
39
- #ifndef FEATURE_UVISOR
40
- // If we are in a nested critical section and interrupts are still enabled
41
- // something has gone wrong.
42
- MBED_ASSERT (!are_interrupts_enabled ());
43
- #else
44
- #warning "core_util_critical_section_enter needs fixing to work from unprivileged code"
45
- #endif /* FEATURE_UVISOR */
46
-
47
39
__disable_irq ();
48
40
}
49
41
50
42
51
43
MBED_WEAK void hal_critical_section_exit ()
52
44
{
53
- // FIXME
54
- #ifndef FEATURE_UVISOR
55
45
// Interrupts must be disabled on invoking an exit from a critical section
56
46
MBED_ASSERT (!are_interrupts_enabled ());
57
- #else
58
- #warning "core_util_critical_section_exit needs fixing to work from unprivileged code"
59
- #endif /* FEATURE_UVISOR */
60
47
61
48
// Restore the IRQs to their state prior to entering the critical section
62
49
if (critical_interrupts_enabled == true) {
63
- __enable_irq ();
50
+ __enable_irq ();
64
51
}
65
52
}
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ bool core_util_in_critical_section(void)
58
58
59
59
void core_util_critical_section_enter (void )
60
60
{
61
+ // FIXME
62
+ #ifdef FEATURE_UVISOR
63
+ #warning "core_util_critical_section_enter needs fixing to work from unprivileged code"
64
+ #endif /* FEATURE_UVISOR */
65
+
61
66
// If the reentrancy counter overflows something has gone badly wrong.
62
67
MBED_ASSERT (critical_section_reentrancy_counter < UINT32_MAX );
63
68
@@ -70,6 +75,11 @@ void core_util_critical_section_enter(void)
70
75
71
76
void core_util_critical_section_exit (void )
72
77
{
78
+ // FIXME
79
+ #ifdef FEATURE_UVISOR
80
+ #warning "core_util_critical_section_exit needs fixing to work from unprivileged code"
81
+ #endif /* FEATURE_UVISOR */
82
+
73
83
// If critical_section_enter has not previously been called, do nothing
74
84
if (critical_section_reentrancy_counter == 0 ) {
75
85
return ;
You can’t perform that action at this time.
0 commit comments