aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-osinte-vxworks.adb
diff options
context:
space:
mode:
authorPascal Obry <obry@adacore.com>2007-04-06 11:15:56 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-04-06 11:15:56 +0200
commit2c851ddd1c40ec8c1adf8e92ce830e5e22b4a267 (patch)
tree092f27b61c5cb3f1ab8ec29f84c0d7590185bfd6 /gcc/ada/s-osinte-vxworks.adb
parent2d7475246d0e0e573138fd47bd31a091df0dc4ae (diff)
downloadgcc-2c851ddd1c40ec8c1adf8e92ce830e5e22b4a267.zip
gcc-2c851ddd1c40ec8c1adf8e92ce830e5e22b4a267.tar.gz
gcc-2c851ddd1c40ec8c1adf8e92ce830e5e22b4a267.tar.bz2
s-osprim-mingw.adb (Timed_Delay): Use the right clock (standard one or the monotonic used by Ada.Real_Time) to...
2007-04-06 Pascal Obry <obry@adacore.com> * s-osprim-mingw.adb (Timed_Delay): Use the right clock (standard one or the monotonic used by Ada.Real_Time) to compute the sleep duration on Windows. From-SVN: r123546
Diffstat (limited to 'gcc/ada/s-osinte-vxworks.adb')
-rw-r--r--gcc/ada/s-osinte-vxworks.adb39
1 files changed, 15 insertions, 24 deletions
diff --git a/gcc/ada/s-osinte-vxworks.adb b/gcc/ada/s-osinte-vxworks.adb
index 6cad500..dd306ad 100644
--- a/gcc/ada/s-osinte-vxworks.adb
+++ b/gcc/ada/s-osinte-vxworks.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1997-2006 Free Software Foundation --
+-- Copyright (C) 1997-2006, 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- --
@@ -31,7 +31,7 @@
-- --
------------------------------------------------------------------------------
--- This is the VxWorks version.
+-- This is the VxWorks version
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
@@ -45,7 +45,7 @@ package body System.OS_Interface is
use type Interfaces.C.int;
Low_Priority : constant := 255;
- -- VxWorks native (default) lowest scheduling priority.
+ -- VxWorks native (default) lowest scheduling priority
------------
-- getpid --
@@ -123,12 +123,13 @@ package body System.OS_Interface is
function To_Timespec (D : Duration) return timespec is
S : time_t;
F : Duration;
+
begin
S := time_t (Long_Long_Integer (D));
F := D - Duration (S);
- -- If F has negative value due to a round-up, adjust for positive F
- -- value.
+ -- If F is negative due to a round-up, adjust for positive F value
+
if F < 0.0 then
S := S - 1;
F := F + 1.0;
@@ -151,16 +152,15 @@ package body System.OS_Interface is
-- To_Clock_Ticks --
--------------------
- -- ??? - For now, we'll always get the system clock rate
- -- since it is allowed to be changed during run-time in
- -- VxWorks. A better method would be to provide an operation
- -- to set it that so we can always know its value.
- --
- -- Another thing we should probably allow for is a resultant
- -- tick count greater than int'Last. This should probably
- -- be a procedure with two output parameters, one in the
- -- range 0 .. int'Last, and another representing the overflow
- -- count.
+ -- ??? - For now, we'll always get the system clock rate since it is
+ -- allowed to be changed during run-time in VxWorks. A better method would
+ -- be to provide an operation to set it that so we can always know its
+ -- value.
+
+ -- Another thing we should probably allow for is a resultant tick count
+ -- greater than int'Last. This should probably be a procedure with two
+ -- output parameters, one in the range 0 .. int'Last, and another
+ -- representing the overflow count.
function To_Clock_Ticks (D : Duration) return int is
Ticks : Long_Long_Integer;
@@ -195,13 +195,4 @@ package body System.OS_Interface is
return int (Ticks);
end To_Clock_Ticks;
- ----------------
- -- VX_FP_TASK --
- ----------------
-
- function VX_FP_TASK return int is
- begin
- return 16#0008#;
- end VX_FP_TASK;
-
end System.OS_Interface;