diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-15 09:34:10 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-15 09:34:10 +0000 |
commit | f39ac8d76125736c5754bfd234d56aa57e5d2bab (patch) | |
tree | d0e76e1552775f7c169379d42fd863fc6f730459 /gcc/ada/s-osprim-mingw.adb | |
parent | d1f1c0a9e449466a4768d105249559782328cc51 (diff) | |
download | gcc-f39ac8d76125736c5754bfd234d56aa57e5d2bab.tar.gz |
2012-05-15 Geert Bosch <bosch@adacore.com>
* sem_ch9.adb (Allows_Lock_Free_Implementation): out or in out
parameters can be access types as well, not just scalar types,
so relax the test to Is_Elementary_Type.
2012-05-15 Bob Duff <duff@adacore.com>
* s-atacco.ads s-atacco.adb: Replace pragma Elaborate_Body
with pragma No_Body.
(Xyz): Remove Xyz, which is apparently unnecessary.
2012-05-15 Tristan Gingold <gingold@adacore.com>
* a-calend-vms.adb: Complete previous change.
2012-05-15 Bob Duff <duff@adacore.com>
* s-win32.ads: Minor comment fix.
* s-osprim-mingw.adb: Minor editing.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187508 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-osprim-mingw.adb')
-rw-r--r-- | gcc/ada/s-osprim-mingw.adb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/ada/s-osprim-mingw.adb b/gcc/ada/s-osprim-mingw.adb index 6c05b524fb5..a658f71f318 100644 --- a/gcc/ada/s-osprim-mingw.adb +++ b/gcc/ada/s-osprim-mingw.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1998-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 1998-2012, 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- -- @@ -50,9 +50,6 @@ package body System.OS_Primitives is -- libgnarl.dll. The indirection level introduced here has no measurable -- penalties. - -- Note that access variables below must not be declared as constant - -- otherwise the compiler optimization will remove this indirect access. - type DA is access all Duration; -- Use to have indirect access to multi-word variables @@ -129,9 +126,9 @@ package body System.OS_Primitives is Long_Long_Float (TFA.all)); -- If we have a shift of more than Max_Shift seconds we resynchronize - -- the Clock. This is probably due to a manual Clock adjustment, an - -- DST adjustment or an NTP synchronisation. And we want to adjust the - -- time for this system (non-monotonic) clock. + -- the Clock. This is probably due to a manual Clock adjustment, a DST + -- adjustment or an NTP synchronisation. And we want to adjust the time + -- for this system (non-monotonic) clock. if abs (Elap_Secs_Sys - Elap_Secs_Tick) > Max_Shift then Get_Base_Time; @@ -179,7 +176,7 @@ package body System.OS_Primitives is -- a performance counter which has a better precision than the Win32 -- time API. - -- Try at most 10th times to reach the best synchronisation (below 1 + -- Try at most 10 times to reach the best synchronisation (below 1 -- millisecond) otherwise the runtime will use the best value reached -- during the runs. @@ -239,6 +236,7 @@ package body System.OS_Primitives is function Monotonic_Clock return Duration is Current_Ticks : aliased LARGE_INTEGER; Elap_Secs_Tick : Duration; + begin if QueryPerformanceCounter (Current_Ticks'Access) = Win32.FALSE then return 0.0; |