-
+ 2E92A3CE0147F02EB87F13400FC5065364C22F69E61BE618EC4CDF084136EB2FA4CAF66B87DCE21FE8BF285E13B867CC375C3AD35AC26CA8210A1B20460A0CCD
zfp/adainclude/s-parame.ads
(0 . 0)(1 . 193)
627 ------------------------------------------------------------------------------
628 ------------------------------------------------------------------------------
629 -- You do not have, nor can you ever acquire the right to use, copy or --
630 -- distribute this software ; Should you use this software for any purpose, --
631 -- or copy and distribute it to anyone or in any manner, you are breaking --
632 -- the laws of whatever soi-disant jurisdiction, and you promise to --
633 -- continue doing so for the indefinite future. In any case, please --
634 -- always : read and understand any software ; verify any PGP signatures --
635 -- that you use - for any purpose. --
636 -- --
637 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
638 ------------------------------------------------------------------------------
639 ------------------------------------------------------------------------------
640
641 -- Default version used when no target-specific version is provided
642
643 -- This package defines some system dependent parameters for GNAT. These
644 -- are values that are referenced by the runtime library and are therefore
645 -- relevant to the target machine.
646
647 -- The parameters whose value is defined in the spec are not generally
648 -- expected to be changed. If they are changed, it will be necessary to
649 -- recompile the run-time library.
650
651 -- The parameters which are defined by functions can be changed by modifying
652 -- the body of System.Parameters in file s-parame.adb. A change to this body
653 -- requires only rebinding and relinking of the application.
654
655 -- Note: do not introduce any pragma Inline statements into this unit, since
656 -- otherwise the relinking and rebinding capability would be deactivated.
657
658 pragma Compiler_Unit_Warning;
659
660 package System.Parameters is
661 pragma Pure;
662
663 ---------------------------------------
664 -- Task And Stack Allocation Control --
665 ---------------------------------------
666
667 type Task_Storage_Size is new Integer;
668 -- Type used in tasking units for task storage size
669
670 type Size_Type is new Task_Storage_Size;
671 -- Type used to provide task storage size to runtime
672
673 Unspecified_Size : constant Size_Type := Size_Type'First;
674 -- Value used to indicate that no size type is set
675
676 subtype Percentage is Size_Type range -1 .. 100;
677 Dynamic : constant Size_Type := -1;
678 -- The secondary stack ratio is a constant between 0 and 100 which
679 -- determines the percentage of the allocated task stack that is
680 -- used by the secondary stack (the rest being the primary stack).
681 -- The special value of minus one indicates that the secondary
682 -- stack is to be allocated from the heap instead.
683
684 Sec_Stack_Percentage : constant Percentage := Dynamic;
685 -- This constant defines the handling of the secondary stack
686
687 Sec_Stack_Dynamic : constant Boolean := Sec_Stack_Percentage = Dynamic;
688 -- Convenient Boolean for testing for dynamic secondary stack
689
690 function Default_Stack_Size return Size_Type;
691 -- Default task stack size used if none is specified
692
693 function Minimum_Stack_Size return Size_Type;
694 -- Minimum task stack size permitted
695
696 function Adjust_Storage_Size (Size : Size_Type) return Size_Type;
697 -- Given the storage size stored in the TCB, return the Storage_Size
698 -- value required by the RM for the Storage_Size attribute. The
699 -- required adjustment is as follows:
700 --
701 -- when Size = Unspecified_Size, return Default_Stack_Size
702 -- when Size < Minimum_Stack_Size, return Minimum_Stack_Size
703 -- otherwise return given Size
704
705 Default_Env_Stack_Size : constant Size_Type := 8_192_000;
706 -- Assumed size of the environment task, if no other information
707 -- is available. This value is used when stack checking is
708 -- enabled and no GNAT_STACK_LIMIT environment variable is set.
709
710 Stack_Grows_Down : constant Boolean := True;
711 -- This constant indicates whether the stack grows up (False) or
712 -- down (True) in memory as functions are called. It is used for
713 -- proper implementation of the stack overflow check.
714
715 ----------------------------------------------
716 -- Characteristics of types in Interfaces.C --
717 ----------------------------------------------
718
719 long_bits : constant := Long_Integer'Size;
720 -- Number of bits in type long and unsigned_long. The normal convention
721 -- is that this is the same as type Long_Integer, but this may not be true
722 -- of all targets.
723
724 ptr_bits : constant := Standard'Address_Size;
725 subtype C_Address is System.Address;
726 -- Number of bits in Interfaces.C pointers, normally a standard address
727
728 C_Malloc_Linkname : constant String := "__gnat_malloc";
729 -- Name of runtime function used to allocate such a pointer
730
731 ----------------------------------------------
732 -- Behavior of Pragma Finalize_Storage_Only --
733 ----------------------------------------------
734
735 -- Garbage_Collected is a Boolean constant whose value indicates the
736 -- effect of the pragma Finalize_Storage_Entry on a controlled type.
737
738 -- Garbage_Collected = False
739
740 -- The system releases all storage on program termination only,
741 -- but not other garbage collection occurs, so finalization calls
742 -- are omitted only for outer level objects can be omitted if
743 -- pragma Finalize_Storage_Only is used.
744
745 -- Garbage_Collected = True
746
747 -- The system provides full garbage collection, so it is never
748 -- necessary to release storage for controlled objects for which
749 -- a pragma Finalize_Storage_Only is used.
750
751 Garbage_Collected : constant Boolean := False;
752 -- The storage mode for this system (release on program exit)
753
754 ---------------------
755 -- Tasking Profile --
756 ---------------------
757
758 -- In the following sections, constant parameters are defined to
759 -- allow some optimizations and fine tuning within the tasking run time
760 -- based on restrictions on the tasking features.
761
762 ----------------------
763 -- Locking Strategy --
764 ----------------------
765
766 Single_Lock : constant Boolean := False;
767 -- Indicates whether a single lock should be used within the tasking
768 -- run-time to protect internal structures. If True, a single lock
769 -- will be used, meaning less locking/unlocking operations, but also
770 -- more global contention. In general, Single_Lock should be set to
771 -- True on single processor machines, and to False to multi-processor
772 -- systems, but this can vary from application to application and also
773 -- depends on the scheduling policy.
774
775 -------------------
776 -- Task Abortion --
777 -------------------
778
779 No_Abort : constant Boolean := False;
780 -- This constant indicates whether abort statements and asynchronous
781 -- transfer of control (ATC) are disallowed. If set to True, it is
782 -- assumed that neither construct is used, and the run time does not
783 -- need to defer/undefer abort and check for pending actions at
784 -- completion points. A value of True for No_Abort corresponds to:
785 -- pragma Restrictions (No_Abort_Statements);
786 -- pragma Restrictions (Max_Asynchronous_Select_Nesting => 0);
787
788 ---------------------
789 -- Task Attributes --
790 ---------------------
791
792 Max_Attribute_Count : constant := 32;
793 -- Number of task attributes stored in the task control block
794
795 --------------------
796 -- Runtime Traces --
797 --------------------
798
799 Runtime_Traces : constant Boolean := False;
800 -- This constant indicates whether the runtime outputs traces to a
801 -- predefined output or not (True means that traces are output).
802 -- See System.Traces for more details.
803
804 -----------------------
805 -- Task Image Length --
806 -----------------------
807
808 Max_Task_Image_Length : constant := 256;
809 -- This constant specifies the maximum length of a task's image
810
811 ------------------------------
812 -- Exception Message Length --
813 ------------------------------
814
815 Default_Exception_Msg_Max_Length : constant := 200;
816 -- This constant specifies the default number of characters to allow
817 -- in an exception message (200 is minimum required by RM 11.4.1(18)).
818
819 end System.Parameters;