diff options
Diffstat (limited to 'gcc/ada/s-taprop-posix.adb')
-rw-r--r-- | gcc/ada/s-taprop-posix.adb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/ada/s-taprop-posix.adb b/gcc/ada/s-taprop-posix.adb index cdbc0643d7a..5ed7badc853 100644 --- a/gcc/ada/s-taprop-posix.adb +++ b/gcc/ada/s-taprop-posix.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2015, 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- -- @@ -278,7 +278,7 @@ package body System.Task_Primitives.Operations is -- Absolute deadline specified using the tasking clock (CLOCK_RT_Ada) elsif Mode = Absolute_RT - or else OSC.CLOCK_RT_Ada = OSC.CLOCK_REALTIME + or else OSC.CLOCK_RT_Ada = OSC.CLOCK_REALTIME then pragma Warnings (On); Abs_Time := Duration'Min (Check_Time + Max_Sensible_Delay, Time); @@ -293,10 +293,10 @@ package body System.Task_Primitives.Operations is else declare - Cal_Check_Time : constant Duration := - OS_Primitives.Monotonic_Clock; + Cal_Check_Time : constant Duration := OS_Primitives.Clock; RT_Time : constant Duration := Time + Check_Time - Cal_Check_Time; + begin Abs_Time := Duration'Min (Check_Time + Max_Sensible_Delay, RT_Time); @@ -315,21 +315,20 @@ package body System.Task_Primitives.Operations is procedure Stack_Guard (T : ST.Task_Id; On : Boolean) is Stack_Base : constant Address := Get_Stack_Base (T.Common.LL.Thread); - Guard_Page_Address : Address; - - Res : Interfaces.C.int; + Page_Size : Address; + Res : Interfaces.C.int; begin if Stack_Base_Available then -- Compute the guard page address - Guard_Page_Address := - Stack_Base - (Stack_Base mod Get_Page_Size) + Get_Page_Size; - + Page_Size := Address (Get_Page_Size); Res := - mprotect (Guard_Page_Address, Get_Page_Size, - prot => (if On then PROT_ON else PROT_OFF)); + mprotect + (Stack_Base - (Stack_Base mod Page_Size) + Page_Size, + size_t (Page_Size), + prot => (if On then PROT_ON else PROT_OFF)); pragma Assert (Res = 0); end if; end Stack_Guard; @@ -978,7 +977,8 @@ package body System.Task_Primitives.Operations is is Attributes : aliased pthread_attr_t; Adjusted_Stack_Size : Interfaces.C.size_t; - Page_Size : constant Interfaces.C.size_t := Get_Page_Size; + Page_Size : constant Interfaces.C.size_t := + Interfaces.C.size_t (Get_Page_Size); Result : Interfaces.C.int; function Thread_Body_Access is new |