procedure TC_Check (T_Counts : Tamper_Counts) is
begin
- if T_Check and then T_Counts.Busy > 0 then
- raise Program_Error with
- "attempt to tamper with cursors";
+ if T_Check then
+ if T_Counts.Busy > 0 then
+ raise Program_Error with
+ "attempt to tamper with cursors";
+ end if;
+
+ -- The lock status (which monitors "element tampering") always
+ -- implies that the busy status (which monitors "cursor
+ -- tampering") is set too; this is a representation invariant.
+ -- Thus if the busy count is zero, then the lock count
+ -- must also be zero.
+
+ pragma Assert (T_Counts.Lock = 0);
end if;
-
- -- The lock status (which monitors "element tampering") always
- -- implies that the busy status (which monitors "cursor tampering")
- -- is set too; this is a representation invariant. Thus if the busy
- -- bit is not set, then the lock bit must not be set either.
-
- pragma Assert (T_Counts.Lock = 0);
end TC_Check;
--------------