diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 11:12:03 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-01-07 11:12:03 +0100 |
commit | 1c85591cabcde20a01a2ecb90d857625a5681ae4 (patch) | |
tree | 23660b48f112efe646ffdfa4c8864aa92bdcbc03 /gcc/ada/s-taprop-linux.adb | |
parent | b6e5a1ec2c33cd98e0f3ca4818993a3a00ef05eb (diff) | |
download | gcc-1c85591cabcde20a01a2ecb90d857625a5681ae4.zip gcc-1c85591cabcde20a01a2ecb90d857625a5681ae4.tar.gz gcc-1c85591cabcde20a01a2ecb90d857625a5681ae4.tar.bz2 |
[multiple changes]
2015-01-07 Robert Dewar <dewar@adacore.com>
* a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
exp_ch3.adb: Minor reformatting.
2015-01-07 Doug Rupp <rupp@adacore.com>
* s-linux.ads (clockid_t): New subtype.
* s-osinte-linux.ads (pragma Linker Options): Add -lrt.
(clockid_t): New subtype.
(clock_getres): Import system call.
* s-taprop-linux.adb (System.OS_Constants): With and rename.
(RT_Resolution): Remove
hardcoded value and call clock_getres.
* s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
2015-01-07 Robert Dewar <dewar@adacore.com>
* sem_warn.adb (Check_One_Unit): Guard against context item
with no Entity field.
From-SVN: r219289
Diffstat (limited to 'gcc/ada/s-taprop-linux.adb')
-rw-r--r-- | gcc/ada/s-taprop-linux.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/s-taprop-linux.adb b/gcc/ada/s-taprop-linux.adb index a95013f..bf5e992 100644 --- a/gcc/ada/s-taprop-linux.adb +++ b/gcc/ada/s-taprop-linux.adb @@ -44,6 +44,7 @@ with Interfaces.C.Extensions; with System.Task_Info; with System.Tasking.Debug; with System.Interrupt_Management; +with System.OS_Constants; with System.OS_Primitives; with System.Stack_Checking.Operations; with System.Multiprocessors; @@ -56,6 +57,7 @@ with System.Soft_Links; package body System.Task_Primitives.Operations is + package OSC renames System.OS_Constants; package SSL renames System.Soft_Links; package SC renames System.Stack_Checking.Operations; @@ -658,8 +660,13 @@ package body System.Task_Primitives.Operations is ------------------- function RT_Resolution return Duration is + TS : aliased timespec; + Result : int; begin - return 10#1.0#E-6; + Result := clock_getres (OSC.CLOCK_REALTIME, TS'Unchecked_Access); + pragma Assert (Result = 0); + + return To_Duration (TS); end RT_Resolution; ------------ |