aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 11:59:42 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2014-06-13 11:59:42 +0200
commit65ede00530bf84ad6fb7a04f6f1ff92cb5b095d6 (patch)
tree8d25ae428a994a05f19b96f57c26ab468dda19a4 /gcc
parentc00b86e2c30d599d4f6893ac09fca13b17dde96c (diff)
downloadgcc-65ede00530bf84ad6fb7a04f6f1ff92cb5b095d6.zip
gcc-65ede00530bf84ad6fb7a04f6f1ff92cb5b095d6.tar.gz
gcc-65ede00530bf84ad6fb7a04f6f1ff92cb5b095d6.tar.bz2
[multiple changes]
2014-06-13 Geert Bosch <bosch@adacore.com> * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi, s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads, s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent. 2014-06-13 Robert Dewar <dewar@adacore.com> * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting. From-SVN: r211616
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog10
-rw-r--r--gcc/ada/gnat_rm.texi68
-rw-r--r--gcc/ada/gnat_ugn.texi11
-rw-r--r--gcc/ada/s-taprob.adb10
-rw-r--r--gcc/ada/s-tarest.adb5
-rw-r--r--gcc/ada/s-tasinf-linux.ads7
-rw-r--r--gcc/ada/s-tasinf-mingw.ads7
-rw-r--r--gcc/ada/s-tasinf-solaris.ads7
-rw-r--r--gcc/ada/s-tasinf-vxworks.ads7
-rw-r--r--gcc/ada/s-tasinf.ads7
-rw-r--r--gcc/ada/s-tasini.adb5
-rw-r--r--gcc/ada/sem_prag.adb6
12 files changed, 85 insertions, 65 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 98c3856..9abc47c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,13 @@
+2014-06-13 Geert Bosch <bosch@adacore.com>
+
+ * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
+ s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
+ s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
+
+2014-06-13 Robert Dewar <dewar@adacore.com>
+
+ * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
+
2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
* freeze.adb (Freeze_Entity): Remove the check concerning volatile
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index 351820d..0ae2e21 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -630,7 +630,6 @@ The GNAT Library
* System.Restrictions (s-restri.ads)::
* System.Rident (s-rident.ads)::
* System.Strings.Stream_Ops (s-ststop.ads)::
-* System.Task_Info (s-tasinf.ads)::
* System.Unsigned_Types (s-unstyp.ads)::
* System.Wch_Cnv (s-wchcnv.ads)::
* System.Wch_Con (s-wchcon.ads)::
@@ -1082,7 +1081,6 @@ consideration, the use of these pragmas should be minimized.
* Pragma Suppress_Debug_Info::
* Pragma Suppress_Exception_Locations::
* Pragma Suppress_Initialization::
-* Pragma Task_Info::
* Pragma Task_Name::
* Pragma Task_Storage::
* Pragma Test_Case::
@@ -6870,27 +6868,6 @@ to apply to the base type and all its subtypes. If the pragma is given
for other than a first subtype, then it applies only to the given subtype.
The pragma may not be given after the type is frozen.
-@node Pragma Task_Info
-@unnumberedsec Pragma Task_Info
-@findex Task_Info
-@noindent
-Syntax
-
-@smallexample @c ada
-pragma Task_Info (EXPRESSION);
-@end smallexample
-
-@noindent
-This pragma appears within a task definition (like pragma
-@code{Priority}) and applies to the task in which it appears. The
-argument must be of type @code{System.Task_Info.Task_Info_Type}.
-The @code{Task_Info} pragma provides system dependent control over
-aspects of tasking implementation, for example, the ability to map
-tasks to specific processors. For details on the facilities available
-for the version of GNAT that you are using, see the documentation
-in the spec of package System.Task_Info in the runtime
-library.
-
@node Pragma Task_Name
@unnumberedsec Pragma Task_Name
@findex Task_Name
@@ -19872,15 +19849,6 @@ It is intended primarily to support implicit use of such subprograms when
stream attributes are applied to string types, but the subprograms in this
package can be used directly by application programs.
-@node System.Task_Info (s-tasinf.ads)
-@section @code{System.Task_Info} (@file{s-tasinf.ads})
-@cindex @code{System.Task_Info} (@file{s-tasinf.ads})
-@cindex Task_Info pragma
-
-@noindent
-This package provides target dependent functionality that is used
-to support the @code{Task_Info} pragma
-
@node System.Unsigned_Types (s-unstyp.ads)
@section @code{System.Unsigned_Types} (@file{s-unstyp.ads})
@cindex @code{System.Unsigned_Types} (@file{s-unstyp.ads})
@@ -22431,6 +22399,7 @@ compatibility purposes.
* pragma No_Run_Time::
* pragma Ravenscar::
* pragma Restricted_Run_Time::
+* pragma Task_Info::
@end menu
@node pragma No_Run_Time
@@ -22459,6 +22428,41 @@ pragma @code{Profile (Restricted)}. The latter usage is
preferred since the Ada 2005 pragma @code{Profile} is intended for
this kind of implementation dependent addition.
+@node pragma Task_Info
+@section pragma Task_Info
+
+The functionality provided by pragma @code{Task_Info} is now part of the
+Ada language. The @code{CPU} aspect and the package
+@code{System.Multiprocessors} offer a less system-dependent way to specify
+task affinity or to query the number of processsors.
+
+@noindent
+Syntax
+
+@smallexample @c ada
+pragma Task_Info (EXPRESSION);
+@end smallexample
+
+@noindent
+This pragma appears within a task definition (like pragma
+@code{Priority}) and applies to the task in which it appears. The
+argument must be of type @code{System.Task_Info.Task_Info_Type}.
+The @code{Task_Info} pragma provides system dependent control over
+aspects of tasking implementation, for example, the ability to map
+tasks to specific processors. For details on the facilities available
+for the version of GNAT that you are using, see the documentation
+in the spec of package System.Task_Info in the runtime
+library.
+
+@node package System.Task_Info (s-tasinf.ads)
+@section package System.Task_Info (@file{s-tasinf.ads})
+
+@noindent
+This package provides target dependent functionality that is used
+to support the @code{Task_Info} pragma. The predefined Ada package
+ @code{System.Multiprocessors} and the @code{CPU} aspect now provide a
+standard replacement for GNAT's @code{Task_Info} functionality.
+
@include fdl.texi
@c GNU Free Documentation License
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index 9a295cb..d9c960c 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -22873,14 +22873,7 @@ stack overflow.) On OpenVMS Alpha systems, if the pragma
area is created. In the absence of a pragma @code{TASK_STORAGE},
a default guard area is created.
-GNAT supplies the following task-related pragmas:
-
-@itemize @bullet
-@item @code{TASK_INFO}
-
-This pragma appears within a task definition and
-applies to the task in which it appears. The argument
-must be of type @code{SYSTEM.TASK_INFO.TASK_INFO_TYPE}.
+GNAT supplies the following task-related pragma:
@item @code{TASK_STORAGE}
@@ -23075,8 +23068,6 @@ following:
@item @code{SOURCE_REFERENCE}
-@item @code{TASK_INFO}
-
@item @code{UNCHECKED_UNION}
@item @code{UNIMPLEMENTED_UNIT}
diff --git a/gcc/ada/s-taprob.adb b/gcc/ada/s-taprob.adb
index ec61f78..755b772 100644
--- a/gcc/ada/s-taprob.adb
+++ b/gcc/ada/s-taprob.adb
@@ -31,17 +31,19 @@
------------------------------------------------------------------------------
pragma Polling (Off);
--- Turn off polling, we do not want ATC polling to take place during
--- tasking operations. It causes infinite loops and other problems.
+-- Turn off polling, we do not want ATC polling to take place during tasking
+-- operations. It causes infinite loops and other problems.
with System.Task_Primitives.Operations;
with System.Parameters;
with System.Traces;
with System.Soft_Links.Tasking;
-with System.Secondary_Stack; pragma Elaborate_All (System.Secondary_Stack);
+
+with System.Secondary_Stack;
+pragma Elaborate_All (System.Secondary_Stack);
pragma Unreferenced (System.Secondary_Stack);
-- Make sure the body of Secondary_Stack is elaborated before calling
--- Init_Tasking_Soft_Links.
+-- Init_Tasking_Soft_Links. See comments for this routine for explanation.
package body System.Tasking.Protected_Objects is
diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb
index f3118dc..1436f2a 100644
--- a/gcc/ada/s-tarest.adb
+++ b/gcc/ada/s-tarest.adb
@@ -49,9 +49,10 @@ with System.Task_Primitives.Operations;
with System.Soft_Links.Tasking;
with System.Storage_Elements;
-with System.Secondary_Stack; pragma Elaborate_All (System.Secondary_Stack);
+with System.Secondary_Stack;
+pragma Elaborate_All (System.Secondary_Stack);
-- Make sure the body of Secondary_Stack is elaborated before calling
--- Init_Tasking_Soft_Links.
+-- Init_Tasking_Soft_Links. See comments for this routine for explanation.
with System.Soft_Links;
-- Used for the non-tasking routines (*_NT) that refer to global data. They
diff --git a/gcc/ada/s-tasinf-linux.ads b/gcc/ada/s-tasinf-linux.ads
index 740c6bb..94bcac1 100644
--- a/gcc/ada/s-tasinf-linux.ads
+++ b/gcc/ada/s-tasinf-linux.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2007-2012, Free Software Foundation, Inc. --
+-- Copyright (C) 2007-2014, 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- --
@@ -36,14 +36,15 @@
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes.
--- This unit may be used directly from an application program by providing
--- an appropriate WITH, and the interface can be expected to remain stable.
+-- The functionality in this unit is now provided by the predefined package
+-- System.Multiprocessors and the CPU aspect. This package is obsolescent.
-- This is the GNU/Linux version of this module
with System.OS_Interface;
package System.Task_Info is
+ pragma Obsolescent (Task_Info, "use System.Multiprocessors and CPU aspect");
pragma Preelaborate;
pragma Elaborate_Body;
-- To ensure that a body is allowed
diff --git a/gcc/ada/s-tasinf-mingw.ads b/gcc/ada/s-tasinf-mingw.ads
index fb70109..f4892d7 100644
--- a/gcc/ada/s-tasinf-mingw.ads
+++ b/gcc/ada/s-tasinf-mingw.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2007-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2007-2014, 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- --
@@ -36,14 +36,15 @@
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes.
--- This unit may be used directly from an application program by providing
--- an appropriate WITH, and the interface can be expected to remain stable.
+-- The functionality in this unit is now provided by the predefined package
+-- System.Multiprocessors and the CPU aspect. This package is obsolescent.
-- This is the Windows (native) version of this module
with System.Win32;
package System.Task_Info is
+ pragma Obsolescent (Task_Info, "use System.Multiprocessors and CPU aspect");
pragma Preelaborate;
pragma Elaborate_Body;
-- To ensure that a body is allowed
diff --git a/gcc/ada/s-tasinf-solaris.ads b/gcc/ada/s-tasinf-solaris.ads
index a7fc7ac..2b457bc 100644
--- a/gcc/ada/s-tasinf-solaris.ads
+++ b/gcc/ada/s-tasinf-solaris.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
@@ -36,14 +36,15 @@
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes.
--- This unit may be used directly from an application program by providing
--- an appropriate WITH, and the interface can be expected to remain stable.
+-- The functionality in this unit is now provided by the predefined package
+-- System.Multiprocessors and the CPU aspect. This package is obsolescent.
-- This is the Solaris (native) version of this module
with System.OS_Interface;
package System.Task_Info is
+ pragma Obsolescent (Task_Info, "use System.Multiprocessors and CPU aspect");
pragma Preelaborate;
pragma Elaborate_Body;
-- To ensure that a body is allowed
diff --git a/gcc/ada/s-tasinf-vxworks.ads b/gcc/ada/s-tasinf-vxworks.ads
index db6bc56..2c57c2b 100644
--- a/gcc/ada/s-tasinf-vxworks.ads
+++ b/gcc/ada/s-tasinf-vxworks.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2011, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
@@ -36,14 +36,15 @@
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes.
--- This unit may be used directly from an application program by providing
--- an appropriate WITH, and the interface can be expected to remain stable.
+-- The functionality in this unit is now provided by the predefined package
+-- System.Multiprocessors and the CPU aspect. This package is obsolescent.
-- This is the VxWorks version of this package
with Interfaces.C;
package System.Task_Info is
+ pragma Obsolescent (Task_Info, "use System.Multiprocessors and CPU aspect");
pragma Preelaborate;
pragma Elaborate_Body;
-- To ensure that a body is allowed
diff --git a/gcc/ada/s-tasinf.ads b/gcc/ada/s-tasinf.ads
index 55f949a..adad387 100644
--- a/gcc/ada/s-tasinf.ads
+++ b/gcc/ada/s-tasinf.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2014, 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- --
@@ -36,10 +36,11 @@
-- Note: the compiler generates direct calls to this interface, via Rtsfind.
-- Any changes to this interface may require corresponding compiler changes.
--- This unit may be used directly from an application program by providing
--- an appropriate WITH, and the interface can be expected to remain stable.
+-- The functionality in this unit is now provided by the predefined package
+-- System.Multiprocessors and the CPU aspect. This package is obsolescent.
package System.Task_Info is
+ pragma Obsolescent (Task_Info, "use System.Multiprocessors and CPU aspect");
pragma Preelaborate;
pragma Elaborate_Body;
-- To ensure that a body is allowed
diff --git a/gcc/ada/s-tasini.adb b/gcc/ada/s-tasini.adb
index 387854e..45c99cd 100644
--- a/gcc/ada/s-tasini.adb
+++ b/gcc/ada/s-tasini.adb
@@ -47,10 +47,11 @@ with System.Soft_Links.Tasking;
with System.Tasking.Debug;
with System.Parameters;
-with System.Secondary_Stack; pragma Elaborate_All (System.Secondary_Stack);
+with System.Secondary_Stack;
+pragma Elaborate_All (System.Secondary_Stack);
pragma Unreferenced (System.Secondary_Stack);
-- Make sure the body of Secondary_Stack is elaborated before calling
--- Init_Tasking_Soft_Links.
+-- Init_Tasking_Soft_Links. See comments for this routine for explanation.
package body System.Tasking.Initialization is
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 284cdb5..797840f 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -20519,6 +20519,12 @@ package body Sem_Prag is
begin
GNAT_Pragma;
+ if Warn_On_Obsolescent_Feature then
+ Error_Msg_N
+ ("'G'N'A'T pragma Task_Info is now obsolete, use 'C'P'U "
+ & "instead?j?", N);
+ end if;
+
if Nkind (P) /= N_Task_Definition then
Error_Pragma ("pragma% must appear in task definition");
end if;