------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- You do not have, nor can you ever acquire the right to use, copy or -- -- distribute this software ; Should you use this software for any purpose, -- -- or copy and distribute it to anyone or in any manner, you are breaking -- -- the laws of whatever soi-disant jurisdiction, and you promise to -- -- continue doing so for the indefinite future. In any case, please -- -- always : read and understand any software ; verify any PGP signatures -- -- that you use - for any purpose. -- -- -- -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ package body System.Elaboration_Allocators is Elaboration_In_Progress : Boolean; pragma Atomic (Elaboration_In_Progress); -- Flag to show if elaboration is active. We don't attempt to initialize -- this because we want to be sure it gets reset if we are in a multiple -- elaboration situation of some kind. Make it atomic to prevent race -- conditions of any kind (not clearly necessary, but harmless!) ------------------------------ -- Check_Standard_Allocator -- ------------------------------ procedure Check_Standard_Allocator is begin if not Elaboration_In_Progress then raise Program_Error with "standard allocator after elaboration is complete is not allowed " & "(No_Standard_Allocators_After_Elaboration restriction active)"; end if; end Check_Standard_Allocator; ----------------------------- -- Mark_End_Of_Elaboration -- ----------------------------- procedure Mark_End_Of_Elaboration is begin Elaboration_In_Progress := False; end Mark_End_Of_Elaboration; ------------------------------- -- Mark_Start_Of_Elaboration -- ------------------------------- procedure Mark_Start_Of_Elaboration is begin Elaboration_In_Progress := True; end Mark_Start_Of_Elaboration; end System.Elaboration_Allocators;