06effe875c
2004-02-04 Robert Dewar <dewar@gnat.com> * 5gtasinf.adb, 5gtasinf.ads, 5gtaprop.adb, ali.adb, ali.ads, gprcmd.adb: Minor reformatting * bindgen.adb: Output restrictions string for new style restrictions handling * impunit.adb: Add s-rident.ads (System.Rident) and s-restri (System.Restrictions) * lib-writ.adb: Fix bug in writing restrictions string (last few entries wrong) * s-restri.ads, s-restri.adb: Change name Restrictions to Run_Time_Restrictions to avoid conflict with package name. Add circuit to read and acquire run time restrictions. 2004-02-04 Jose Ruiz <ruiz@act-europe.fr> * restrict.ads, restrict.adb: Use the new restriction No_Task_Attributes_Package instead of the old No_Task_Attributes. * sem_prag.adb: No_Task_Attributes is a synonym of No_Task_Attributes_Package. * snames.ads, snames.adb: New entry for proper handling of No_Task_Attributes. * s-rident.ads: Adding restriction No_Task_Attributes_Package (AI-00249) that supersedes the GNAT specific restriction No_Task_Attributes. 2004-02-04 Ed Schonberg <schonberg@gnat.com> * sem_prag.adb: (Analyze_Pragma, case Warnings): In an inlined body, as in an instance body, an identifier may be wrapped in an unchecked conversion. 2004-02-04 Vincent Celier <celier@gnat.com> * lib-writ.ads: Comment update for the W lines * bld.adb: (Expression): An empty string list is static * fname-uf.adb: Minor comment update * fname-uf.ads: (Get_File_Name): Document new parameter May_Fail * gnatbind.adb: Initialize Cumulative_Restrictions with the restrictions on the target. From-SVN: r77233
62 lines
3.1 KiB
Ada
62 lines
3.1 KiB
Ada
------------------------------------------------------------------------------
|
|
-- --
|
|
-- GNAT COMPILER COMPONENTS --
|
|
-- --
|
|
-- S Y S T E M . R E S T R I C T I O N S --
|
|
-- --
|
|
-- S p e c --
|
|
-- --
|
|
-- Copyright (C) 2004 Free Software Foundation, Inc. --
|
|
-- --
|
|
-- GNAT is free software; you can redistribute it and/or modify it under --
|
|
-- terms of the GNU General Public License as published by the Free Soft- --
|
|
-- ware Foundation; either version 2, or (at your option) any later ver- --
|
|
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
|
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
|
-- for more details. You should have received a copy of the GNU General --
|
|
-- Public License distributed with GNAT; see file COPYING. If not, write --
|
|
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
|
|
-- MA 02111-1307, USA. --
|
|
-- --
|
|
-- GNAT was originally developed by the GNAT team at New York University. --
|
|
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
|
-- --
|
|
------------------------------------------------------------------------------
|
|
|
|
-- This package provides a run-time interface for checking the set of
|
|
-- restrictions that applies to the current partition. The information
|
|
-- comes both from explicit restriction pragmas present, and also from
|
|
-- compile time checking.
|
|
|
|
-- The package simply contains an instantiation of System.Rident, but
|
|
-- with names discarded, so that we do not have image tables for the
|
|
-- large restriction enumeration types at run time.
|
|
|
|
with System.Rident;
|
|
|
|
package System.Restrictions is
|
|
pragma Discard_Names;
|
|
package Rident is new System.Rident;
|
|
|
|
Run_Time_Restrictions : Rident.Restrictions_Info;
|
|
|
|
------------------
|
|
-- Subprograms --
|
|
-----------------
|
|
|
|
function Abort_Allowed return Boolean;
|
|
pragma Inline (Abort_Allowed);
|
|
-- Tests to see if abort is allowed by the current restrictions settings.
|
|
-- For abort to be allowed, either No_Abort_Statements must be False,
|
|
-- or Max_Asynchronous_Select_Nesting must be non-zero.
|
|
|
|
function Tasking_Allowed return Boolean;
|
|
pragma Inline (Tasking_Allowed);
|
|
-- Tests to see if tasking operations are allowed by the current
|
|
-- restrictions settings. For tasking to be allowed Max_Tasks must
|
|
|
|
end System.Restrictions;
|
|
|
|
|