-- 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;
------------------------
------------------------
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;
------------------------
------------------------
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;
------------------------
------------------------
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;
------------------------
------------------------
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;
-----------------------
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;
----------------------------------
is
pragma Unreferenced (EO);
begin
- -- No action for this target
null;
end Thread_Body_Exceptional_Exit;
procedure Thread_Body_Leave is
begin
- -- No action for this target
null;
end Thread_Body_Leave;