diff options
author | Javier Miranda <miranda@adacore.com> | 2006-10-31 19:11:44 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2006-10-31 19:11:44 +0100 |
commit | 15b540bec80c476a2a37f639a25797357f0172f3 (patch) | |
tree | f67411d1caed58af4a10e05969be9e1aa9909b51 /gcc/ada/s-tarest.adb | |
parent | d5ef47fb25f583d46b42dd53917aa5ff5990bccb (diff) | |
download | gcc-15b540bec80c476a2a37f639a25797357f0172f3.zip gcc-15b540bec80c476a2a37f639a25797357f0172f3.tar.gz gcc-15b540bec80c476a2a37f639a25797357f0172f3.tar.bz2 |
2006-10-31 Javier Miranda <miranda@adacore.com>
* s-tpoben.ads, s-tpoben.adb, s-taprob.ads, s-taprob.adb
(Get_Ceiling): New subprogram that returns
the ceiling priority of the protected object.
(Set_Ceiling): New subprogram that sets the new ceiling priority of
the protected object.
* s-tarest.adb: (Create_Restricted_Task): Fix potential CE.
* s-taskin.ads, s-taskin.adb: (Storage_Size): New function.
From-SVN: r118317
Diffstat (limited to 'gcc/ada/s-tarest.adb')
-rw-r--r-- | gcc/ada/s-tarest.adb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/ada/s-tarest.adb b/gcc/ada/s-tarest.adb index 6c43d7c..ab64fa8 100644 --- a/gcc/ada/s-tarest.adb +++ b/gcc/ada/s-tarest.adb @@ -473,6 +473,7 @@ package body System.Tasking.Restricted.Stages is Self_ID : constant Task_Id := STPO.Self; Base_Priority : System.Any_Priority; Success : Boolean; + Len : Integer; begin -- Stack is not preallocated on this target, so that Stack_Address must @@ -515,10 +516,11 @@ package body System.Tasking.Restricted.Stages is Created_Task.Entry_Calls (1).Self := Created_Task; - Created_Task.Common.Task_Image_Len := + Len := Integer'Min (Created_Task.Common.Task_Image'Length, Task_Image'Length); - Created_Task.Common.Task_Image - (1 .. Created_Task.Common.Task_Image_Len) := Task_Image; + Created_Task.Common.Task_Image_Len := Len; + Created_Task.Common.Task_Image (1 .. Len) := + Task_Image (Task_Image'First .. Task_Image'First + Len - 1); Unlock (Self_ID); |