Skip to content

ATOMIC_BLOCK: Documentation and Compatibility List #761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TimMathias opened this issue Jul 22, 2020 · 1 comment
Open

ATOMIC_BLOCK: Documentation and Compatibility List #761

TimMathias opened this issue Jul 22, 2020 · 1 comment
Assignees

Comments

@TimMathias
Copy link

TimMathias commented Jul 22, 2020

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
@TimMathias
Copy link
Author

This is an alternative method:

#ifdef ATOMIC_BLOCK
ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
{
#endif
  // Some code.
#ifdef ATOMIC_BLOCK
}
#endif

@kengdahl kengdahl assigned kengdahl and per1234 and unassigned kengdahl Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants