Microchip® Advanced Software Framework

atomic.h File Reference

Atomic operations APIs.

Copyright (c) 2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define ATOMIC_SECTION_ENTER   system_enter_critical_section();
 
#define ATOMIC_SECTION_EXIT   system_leave_critical_section();
 

Functions

void system_enter_critical_section (void)
 Enters a critical section. More...
 
void system_leave_critical_section (void)
 Leaves a critical section. More...
 

void system_enter_critical_section ( void  )

Enters a critical section.

Disables global interrupts. To support nested critical sections, an internal count of the critical section nesting will be kept, so that global interrupts are only re-enabled upon leaving the outermost nested critical section.

References system_interrupt_enter_critical_section().

void system_leave_critical_section ( void  )

Leaves a critical section.

Enables global interrupts. To support nested critical sections, an internal count of the critical section nesting will be kept, so that global interrupts are only re-enabled upon leaving the outermost nested critical section.

References system_interrupt_leave_critical_section().