Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

critical section function

critical section function
[Platform]

Functions

bool core_util_are_interrupts_enabled (void)
 Determine the current interrupts enabled state.
bool core_util_is_isr_active (void)
 Determine if this code is executing from an interrupt.
void core_util_critical_section_enter (void)
 Mark the start of a critical section.
void core_util_critical_section_exit (void)
 Mark the end of a critical section.
bool core_util_in_critical_section (void)
 Determine if we are currently in a critical section.

Function Documentation

bool core_util_are_interrupts_enabled ( void   )

Determine the current interrupts enabled state.

This function can be called to determine whether or not interrupts are currently enabled.

Note:
NOTE: This function works for both cortex-A and cortex-M, although the underlying implementation differs.
Returns:
true if interrupts are enabled, false otherwise

Definition at line 28 of file mbed_critical.c.

void core_util_critical_section_enter ( void   )

Mark the start of a critical section.

This function should be called to mark the start of a critical section of code.

Note:
NOTES: 1) The use of this style of critical section is targetted at C based implementations. 2) These critical sections can be nested. 3) The interrupt enable state on entry to the first critical section (of a nested set, or single section) will be preserved on exit from the section. 4) This implementation will currently only work on code running in privileged mode.

Definition at line 58 of file mbed_critical.c.

void core_util_critical_section_exit ( void   )

Mark the end of a critical section.

This function should be called to mark the end of a critical section of code.

Note:
NOTES: 1) The use of this style of critical section is targetted at C based implementations. 2) These critical sections can be nested. 3) The interrupt enable state on entry to the first critical section (of a nested set, or single section) will be preserved on exit from the section. 4) This implementation will currently only work on code running in privileged mode.

Definition at line 68 of file mbed_critical.c.

bool core_util_in_critical_section ( void   )

Determine if we are currently in a critical section.

Returns:
true if in a critical section, false otherwise.

Definition at line 53 of file mbed_critical.c.

bool core_util_is_isr_active ( void   )

Determine if this code is executing from an interrupt.

This function can be called to determine if the code is running on interrupt context.

Note:
NOTE: This function works for both cortex-A and cortex-M, although the underlying implementation differs.
Returns:
true if in an isr, false otherwise

Definition at line 37 of file mbed_critical.c.