Skip to content

Commit 329f8a1

Browse files
committed
Add core_util_ prefix to are_interrupts_enabled() function.
For consistency with other exposed functions from this file, core_util_ prefix should be added.
1 parent 2292794 commit 329f8a1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

hal/api/critical.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" {
3434
* differs.
3535
* @return true if interrupts are enabled, false otherwise
3636
*/
37-
bool are_interrupts_enabled(void);
37+
bool core_util_are_interrupts_enabled(void);
3838

3939
/** Mark the start of a critical section
4040
*

hal/common/critical.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
static volatile uint32_t interrupt_enable_counter = 0;
3030
static volatile bool critical_interrupts_disabled = false;
3131

32-
bool are_interrupts_enabled(void)
32+
bool core_util_are_interrupts_enabled(void)
3333
{
3434
#if defined(__CORTEX_A9)
3535
return ((__get_CPSR() & 0x80) == 0);
@@ -40,7 +40,7 @@ bool are_interrupts_enabled(void)
4040

4141
void core_util_critical_section_enter()
4242
{
43-
bool interrupts_disabled = !are_interrupts_enabled();
43+
bool interrupts_disabled = !core_util_are_interrupts_enabled();
4444
__disable_irq();
4545

4646
/* Save the interrupt disabled state as it was prior to any nested critical section lock use */
@@ -70,7 +70,7 @@ void core_util_critical_section_exit()
7070

7171
// FIXME
7272
#ifndef FEATURE_UVISOR
73-
bool interrupts_disabled = !are_interrupts_enabled(); /* get the current interrupt disabled state */
73+
bool interrupts_disabled = !core_util_are_interrupts_enabled(); /* get the current interrupt disabled state */
7474

7575
MBED_ASSERT(interrupts_disabled); /* Interrupts must be disabled on invoking an exit from a critical section */
7676
#else

0 commit comments

Comments
 (0)