Pragma Disable_Atomic_Synchronization (GNAT Reference Manual) (original) (raw)
2.50 Pragma Disable_Atomic_Synchronization ¶
Syntax:
pragma Disable_Atomic_Synchronization [(Entity)];
pragma Enable_Atomic_Synchronization [(Entity)];
Ada requires that accesses (reads or writes) of an atomic variable be regarded as synchronization points in the case of multiple tasks. Particularly in the case of multi-processors this may require special handling, e.g. the generation of memory barriers. This synchronization is performed by default, but can be turned off using pragmaDisable_Atomic_Synchronization
. The Enable_Atomic_Synchronization
pragma turns it back on.
The placement and scope rules for these pragmas are the same as those for pragma Suppress
. In particular they can be used as configuration pragmas, or in a declaration sequence where they apply until the end of the scope. If an Entity
argument is present, the action applies only to that entity.