Is_Subpool_Allocation : constant Boolean :=
Pool in Root_Storage_Pool_With_Subpools'Class;
- Master : Finalization_Master_Ptr := null;
- N_Addr : Address;
- N_Ptr : FM_Node_Ptr;
- N_Size : Storage_Count;
- Subpool : Subpool_Handle := null;
+ Master : Finalization_Master_Ptr := null;
+ N_Addr : Address;
+ N_Ptr : FM_Node_Ptr;
+ N_Size : Storage_Count;
+ Subpool : Subpool_Handle := null;
+ Lock_Taken : Boolean := False;
Header_And_Padding : Storage_Offset;
-- This offset includes the size of a FM_Node plus any additional
-- Read - allocation, finalization
-- Write - finalization
+ Lock_Taken := True;
Lock_Task.all;
-- Do not allow the allocation of controlled objects while the
end if;
Unlock_Task.all;
+ Lock_Taken := False;
-- Non-controlled allocation
-- Unlock the task in case the allocation step failed and reraise the
-- exception.
- if Is_Controlled then
+ if Lock_Taken then
Unlock_Task.all;
end if;