Skip to main content

IAR Embedded Workbench for RL78 5.20

Atomic operations

In this section:

When you compile for cores with instruction set support for atomic accesses, the standard C and C++ atomic operations are available in the files stdatomic.h and atomic. If atomic operations are not available, the predefined preprocessor symbol __STDC_NO_ATOMICS__ is defined to 1. This is true both in C and C++.

Atomic operations that cannot be handled natively by the hardware are passed on to library functions. The IAR C/C++ Compiler for RL78 does not include implementations for these functions. A template implementation can be found in the file src\lib\atomic\libatomic.c.