reference-en
reference-en copied to clipboard
ATOMIC_BLOCK: Documentation and Compatibility List
Please could you add some documentation describing the ATOMIC_BLOCK macro with a list of boards/architectures that support it or do not support it as the case my be? I would like to conditionally encapsulate some code within an ATOMIC_BLOCK for the systems that support it. Thank you.
#ifdef SOME_BOARDS_OR_ARCH
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
#endif
// Some code.
#ifdef SOME_BOARDS_OR_ARCH
}
#endif
This is an alternative method:
#ifdef ATOMIC_BLOCK
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
#endif
// Some code.
#ifdef ATOMIC_BLOCK
}
#endif