-
+ D72AA05A37C27031CD0E6E91F2F2D7070EF55916103B1168348BEF7D7227A975C2C981D549317A691BB9E42EAE9435204C83EFBEF3DAE547963028A7CE43CB0Azfp/adainclude/s-elaall.adb(0 . 0)(1 . 55)
455 ------------------------------------------------------------------------------
456 ------------------------------------------------------------------------------
457 -- You do not have, nor can you ever acquire the right to use, copy or --
458 -- distribute this software ; Should you use this software for any purpose, --
459 -- or copy and distribute it to anyone or in any manner, you are breaking --
460 -- the laws of whatever soi-disant jurisdiction, and you promise to --
461 -- continue doing so for the indefinite future. In any case, please --
462 -- always : read and understand any software ; verify any PGP signatures --
463 -- that you use - for any purpose. --
464 -- --
465 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
466 ------------------------------------------------------------------------------
467 ------------------------------------------------------------------------------
468
469 package body System.Elaboration_Allocators is
470
471 Elaboration_In_Progress : Boolean;
472 pragma Atomic (Elaboration_In_Progress);
473 -- Flag to show if elaboration is active. We don't attempt to initialize
474 -- this because we want to be sure it gets reset if we are in a multiple
475 -- elaboration situation of some kind. Make it atomic to prevent race
476 -- conditions of any kind (not clearly necessary, but harmless!)
477
478 ------------------------------
479 -- Check_Standard_Allocator --
480 ------------------------------
481
482 procedure Check_Standard_Allocator is
483 begin
484 if not Elaboration_In_Progress then
485 raise Program_Error with
486 "standard allocator after elaboration is complete is not allowed "
487 & "(No_Standard_Allocators_After_Elaboration restriction active)";
488 end if;
489 end Check_Standard_Allocator;
490
491 -----------------------------
492 -- Mark_End_Of_Elaboration --
493 -----------------------------
494
495 procedure Mark_End_Of_Elaboration is
496 begin
497 Elaboration_In_Progress := False;
498 end Mark_End_Of_Elaboration;
499
500 -------------------------------
501 -- Mark_Start_Of_Elaboration --
502 -------------------------------
503
504 procedure Mark_Start_Of_Elaboration is
505 begin
506 Elaboration_In_Progress := True;
507 end Mark_Start_Of_Elaboration;
508
509 end System.Elaboration_Allocators;