Description
Defines fixed-width generation-stamped handles. Handles contain no native address or Ada access value. They are untrusted scalar input: the owning structure must validate both fields before every use. This package is purely representational and provides no synchronization.
Generation
type Generation is new Interfaces.Unsigned_32;
Stored slot generation. Zero is reserved as invalid.
Handle
type Handle is record
Slot : Slot_Index := 0;
Stamp : Generation := 0;
end record;
Generation-stamped slot identity.
Record fields
- Slot
One-based slot index, or zero for null
- Stamp
Nonzero generation observed when ownership was granted
Is_Null
function Is_Null (Value : Handle) return Boolean
Report whether Value carries the canonical null representation.
Parameters
- Value
Handle to inspect
Return value
True only when both scalar fields are zero
Null_Handle
Null_Handle : constant Handle := (Slot => 0, Stamp => 0);
Null handle accepted only where a leaf package explicitly says so.
Slot_Index
type Slot_Index is new Interfaces.Unsigned_32;
One-based stored slot index. Zero is reserved as the null sentinel.