OSDN Git Service

2006-10-31 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-thread.adb
index 850a423..449a23e 100644 (file)
@@ -16,8 +16,8 @@
 -- 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.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- As a special exception,  if other files  instantiate  generics from this --
 -- unit, or you link  this unit with other files  to produce an executable, --
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  This is the VxWorks/Cert version of this package
-
-with System.Init;
-with System.Secondary_Stack;
+--  This is a dummy version of this package.
 
 with Unchecked_Conversion;
 
-package body System.Threads is
-
-   package SSS renames System.Secondary_Stack;
+with System.Threads.Initialization;
 
-   Current_ATSD  : aliased System.Address := System.Null_Address;
-   pragma Export (C, Current_ATSD, "__gnat_current_atsd");
-
-   function From_Address is
-      new Unchecked_Conversion (Address, ATSD_Access);
+package body System.Threads is
 
    -----------------------
    -- Get_Current_Excep --
    -----------------------
 
    function Get_Current_Excep return EOA is
-      CTSD : ATSD_Access := From_Address (Current_ATSD);
    begin
-      pragma Assert (Current_ATSD /= System.Null_Address);
-      return CTSD.Current_Excep'Access;
+      return null;
    end Get_Current_Excep;
 
    ------------------------
@@ -64,10 +53,8 @@ package body System.Threads is
    ------------------------
 
    function  Get_Jmpbuf_Address return  Address is
-      CTSD : ATSD_Access := From_Address (Current_ATSD);
    begin
-      pragma Assert (Current_ATSD /= System.Null_Address);
-      return CTSD.Jmpbuf_Address;
+      return Null_Address;
    end Get_Jmpbuf_Address;
 
    ------------------------
@@ -75,10 +62,8 @@ package body System.Threads is
    ------------------------
 
    function  Get_Sec_Stack_Addr return  Address is
-      CTSD : ATSD_Access := From_Address (Current_ATSD);
    begin
-      pragma Assert (Current_ATSD /= System.Null_Address);
-      return CTSD.Sec_Stack_Addr;
+      return Null_Address;
    end Get_Sec_Stack_Addr;
 
    ------------------------
@@ -86,10 +71,9 @@ package body System.Threads is
    ------------------------
 
    procedure Set_Jmpbuf_Address (Addr : Address) is
-      CTSD : ATSD_Access := From_Address (Current_ATSD);
+      pragma Unreferenced (Addr);
    begin
-      pragma Assert (Current_ATSD /= System.Null_Address);
-      CTSD.Jmpbuf_Address := Addr;
+      null;
    end Set_Jmpbuf_Address;
 
    ------------------------
@@ -97,10 +81,9 @@ package body System.Threads is
    ------------------------
 
    procedure Set_Sec_Stack_Addr (Addr : Address) is
-      CTSD : ATSD_Access := From_Address (Current_ATSD);
+      pragma Unreferenced (Addr);
    begin
-      pragma Assert (Current_ATSD /= System.Null_Address);
-      CTSD.Sec_Stack_Addr := Addr;
+      null;
    end Set_Sec_Stack_Addr;
 
    -----------------------
@@ -112,18 +95,11 @@ package body System.Threads is
       Sec_Stack_Size       : Natural;
       Process_ATSD_Address : System.Address)
    is
-      --  Current_ATSD must already be a taskVar of taskIdSelf.
-      --  No assertion because taskVarGet is not available on VxWorks/CERT
-
-      TSD : ATSD_Access := From_Address (Process_ATSD_Address);
-
+      pragma Unreferenced (Sec_Stack_Address);
+      pragma Unreferenced (Sec_Stack_Size);
+      pragma Unreferenced (Process_ATSD_Address);
    begin
-      TSD.Sec_Stack_Addr := Sec_Stack_Address;
-      SSS.SS_Init (TSD.Sec_Stack_Addr, Sec_Stack_Size);
-      Current_ATSD := Process_ATSD_Address;
-
-      System.Init.Install_Handler;
-      System.Init.Init_Float;
+      null;
    end Thread_Body_Enter;
 
    ----------------------------------
@@ -135,7 +111,6 @@ package body System.Threads is
    is
       pragma Unreferenced (EO);
    begin
-      --  No action for this target
       null;
    end Thread_Body_Exceptional_Exit;
 
@@ -145,7 +120,6 @@ package body System.Threads is
 
    procedure Thread_Body_Leave is
    begin
-      --  No action for this target
       null;
    end Thread_Body_Leave;