summaryrefslogtreecommitdiff
path: root/gcc/ada/s-taprop-vxworks.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-26 07:35:35 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-26 07:35:35 +0000
commit337a96906900f7e49d045d659ce5255dea58dc34 (patch)
treefce4bf8b7ea36ec5ca61fcf278688a7c3133ad7d /gcc/ada/s-taprop-vxworks.adb
parent35e3878c197ab1098b7fa58ad1116b1ecb992711 (diff)
downloadgcc-337a96906900f7e49d045d659ce5255dea58dc34.tar.gz
2008-03-26 Arnaud Charlet <charlet@adacore.com>
* s-taprop-irix.adb, s-taprop-tru64.adb, s-taprop-lynxos.adb, s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-vxworks.adb, s-taprop-posix.adb (Create_Task): Do not attempt to set task priority or task info if the thread could not be created. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133547 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-taprop-vxworks.adb')
-rw-r--r--gcc/ada/s-taprop-vxworks.adb51
1 files changed, 23 insertions, 28 deletions
diff --git a/gcc/ada/s-taprop-vxworks.adb b/gcc/ada/s-taprop-vxworks.adb
index 5eb4bc99a68..c6469cd2b05 100644
--- a/gcc/ada/s-taprop-vxworks.adb
+++ b/gcc/ada/s-taprop-vxworks.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -33,35 +33,27 @@
-- This is the VxWorks version of this package
--- This package contains all the GNULL primitives that interface directly
--- with the underlying OS.
+-- This package contains all the GNULL primitives that interface directly with
+-- the underlying OS.
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.Tasking.Debug;
--- used for Known_Tasks
-
-with System.Interrupt_Management;
--- used for Keep_Unmasked
--- Abort_Task_Interrupt
--- Signal_ID
--- Initialize_Interrupts
+with Ada.Unchecked_Conversion;
+with Ada.Unchecked_Deallocation;
with Interfaces.C;
-with System.Soft_Links;
--- used for Abort_Defer/Undefer
+with System.Tasking.Debug;
+with System.Interrupt_Management;
+with System.Soft_Links;
-- We use System.Soft_Links instead of System.Tasking.Initialization
--- because the later is a higher level package that we shouldn't depend on.
--- For example when using the restricted run time, it is replaced by
+-- because the later is a higher level package that we shouldn't depend
+-- on. For example when using the restricted run time, it is replaced by
-- System.Tasking.Restricted.Stages.
-with Ada.Unchecked_Conversion;
-with Ada.Unchecked_Deallocation;
-
package body System.Task_Primitives.Operations is
package SSL renames System.Soft_Links;
@@ -754,9 +746,9 @@ package body System.Task_Primitives.Operations is
pragma Atomic_Components (Prio_Array_Type);
Prio_Array : Prio_Array_Type;
- -- Global array containing the id of the currently running task for
- -- each priority. Note that we assume that we are on a single processor
- -- with run-till-blocked scheduling.
+ -- Global array containing the id of the currently running task for each
+ -- priority. Note that we assume that we are on a single processor with
+ -- run-till-blocked scheduling.
procedure Set_Priority
(T : Task_Id;
@@ -776,7 +768,7 @@ package body System.Task_Primitives.Operations is
and then Loss_Of_Inheritance
and then Prio < T.Common.Current_Priority
then
- -- Annex D requirement (RM D.2.2(9))
+ -- Annex D requirement (RM D.2.2(9)):
-- If the task drops its priority due to the loss of inherited
-- priority, it is added at the head of the ready queue for its
@@ -852,7 +844,8 @@ package body System.Task_Primitives.Operations is
Unlock_RTS;
- -- If stack checking is enabled set the stack limit for this task.
+ -- If stack checking is enabled, set the stack limit for this task
+
if Set_Stack_Limit_Hook /= null then
Set_Stack_Limit_Hook.all;
end if;
@@ -985,10 +978,9 @@ package body System.Task_Primitives.Operations is
Succeeded := False;
else
Succeeded := True;
+ Task_Creation_Hook (T.Common.LL.Thread);
+ Set_Priority (T, Priority);
end if;
-
- Task_Creation_Hook (T.Common.LL.Thread);
- Set_Priority (T, Priority);
end Create_Task;
------------------
@@ -1077,6 +1069,9 @@ package body System.Task_Primitives.Operations is
--------------
procedure Finalize (S : in out Suspension_Object) is
+ pragma Unmodified (S);
+ -- S may be modified on other targets, but not on VxWorks
+
Result : STATUS;
begin