C.6.1 The Package System.Atomic_Operations
The language-defined package System.Atomic_Operations
is the parent of a set of child units that provide facilities for manipulating
objects of atomic types and for supporting lock-free synchronization.
The subprograms of this subsystem are Intrinsic subprograms (see
6.3.1)
in order to provide convenient access to machine operations that can
provide these capabilities if they are available in the target environment.
Static Semantics
The library package
System.Atomic_Operations has the following declaration:
package System.Atomic_Operations
with Pure, Nonblocking
is
end System.Atomic_Operations;
System.Atomic_Operations serves as the parent of
other language-defined library units that manipulate atomic objects;
its declaration is empty.
A call to a subprogram is said to be
lock-free
if the subprogram is guaranteed to return from the call while keeping
the processor of the logical thread of control busy for the duration
of the call.
In each child package, a function Is_Lock_Free(...)
is provided to check whether the operations of the child package can
all be provided lock-free for a given object. Is_Lock_Free returns True
if operations defined in the child package are lock-free when applied
to the object denoted by Item, and Is_Lock_Free returns False otherwise.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe