Next: , Previous: , Up: Implementation Defined Pragmas   [Contents][Index]


2.54 Pragma Enable_Atomic_Synchronization

Syntax:

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 pragma Disable_Atomic_Synchronization. The Enable_Atomic_Synchronization pragma can be used to turn it back on.

The placement and scope rules for this pragma are the same as those for pragma Unsuppress. In particular it can be used as a configuration pragma, or in a declaration sequence where it applies till the end of the scope. If an Entity argument is present, the action applies only to that entity.