StateOS
Loading...
Searching...
No Matches
Critical section

masking and unmasking of the interrupts More...

Macros

#define sys_lock()
 save interrupts state then disable interrupts / enter into critical section
#define sys_lockISR()
 ISR alias of sys_lock().
#define sys_unlock()
 restore saved interrupts state / exit from critical section
#define sys_unlockISR()
 ISR alias of sys_unlock().

Detailed Description

masking and unmasking of the interrupts

Macro Definition Documentation

◆ sys_lock

#define sys_lock ( )
Value:
do { lck_t __LOCK = core_set_lock()

save interrupts state then disable interrupts / enter into critical section

Note
can be used in both thread and handler mode (for blockable interrupts)
use ISR alias in blockable interrupt handlers

◆ sys_lockISR

#define sys_lockISR ( )
Value:
#define sys_lock()
save interrupts state then disable interrupts / enter into critical section
Definition oscriticalsection.h:143

ISR alias of sys_lock().

◆ sys_unlock

#define sys_unlock ( )
Value:
core_put_lock(__LOCK); } while (0)

restore saved interrupts state / exit from critical section

Note
can be used in both thread and handler mode (for blockable interrupts)
use ISR alias in blockable interrupt handlers

◆ sys_unlockISR

#define sys_unlockISR ( )
Value:
#define sys_unlock()
restore saved interrupts state / exit from critical section
Definition oscriticalsection.h:158

ISR alias of sys_unlock().