Mistake on this page?
Report an issue in GitHub or email us
Functions
critical section function

Functions

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

Detailed Description

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
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.
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.
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.
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
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.