summaryrefslogtreecommitdiff
path: root/gcc/ada/s-osinte-vxworks.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 07:49:24 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-05 07:49:24 +0000
commit8ffbc40148d6b02adac96d583313108c57e79936 (patch)
treea091e4233d93343ea43e47ffdbf8c63f0f990846 /gcc/ada/s-osinte-vxworks.adb
parent872263e868a7e9473a51782ee5dfbca6041763aa (diff)
downloadgcc-8ffbc40148d6b02adac96d583313108c57e79936.tar.gz
2005-09-01 Arnaud Charlet <charlet@adacore.com>
Jose Ruiz <ruiz@adacore.com> * s-taprop-vxworks.adb: Move with clauses outside Warnings Off now that dependent units are Preelaborate. (Initialize): Call Interrupt_Managemeent.Initialize to ensure proper initialization of this unit. (Specific): Add new procedures Initialize and Delete so that this package can be used for VxWorks 5.x and 6.x (ATCB_Key, ATCB_Key_Address): Moved to Specific package body to hide differences between VxWorks 5.x and 6.x Minor reformatting. (Timed_Delay): Remove calls to Defer/Undefer_Abort, now performed by caller. Use only Preelaborate-compatible constructs. * s-tpopsp-vxworks.adb (ATBC_Key, ATCB_Key_Addr): Moved from Primitives.Operations. (Delete, Initialize): New procedures. * s-osinte-vxworks.adb: Body used to handle differences between VxWorks 5.x and 6.x (kill, Set_Time_Slice, VX_FP_TASK): New functions. * s-osinte-vxworks.ads: Minor reformatting. Add VxWworks 6.x specific functions (only called from VxWorks 6 files). (VX_FP_TASK): Now a function, to handle differences between VxWorks 5 and 6. (Set_Time_Slice): New function, replacing kerneltimeSlice to share code between Vxworks 5 and 6. (taskLock, taskUnlock): Removeed, no longer used. * adaint.c: The wait.h header is not located in the sys directory on VxWorks when using RTPs. (__gnat_set_env_value): Use setenv instead of putenv on VxWorks when using RTPs. (__gnat_dup): dup is available on Vxworks when using RTPs. (__gnat_dup2): dup2 is available on Vxworks when using RTPs. * cal.c: Use the header time.h for Vxworks 6.0 when using RTPs. * expect.c: The wait.h header is not located in the sys directory on VxWorks when using RTPs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103852 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-osinte-vxworks.adb')
-rw-r--r--gcc/ada/s-osinte-vxworks.adb31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ada/s-osinte-vxworks.adb b/gcc/ada/s-osinte-vxworks.adb
index a8b294ffed6..cb8c969c7b0 100644
--- a/gcc/ada/s-osinte-vxworks.adb
+++ b/gcc/ada/s-osinte-vxworks.adb
@@ -47,6 +47,28 @@ package body System.OS_Interface is
Low_Priority : constant := 255;
-- VxWorks native (default) lowest scheduling priority.
+ ----------
+ -- kill --
+ ----------
+
+ function kill (pid : t_id; sig : Signal) return int is
+ function c_kill (pid : t_id; sig : Signal) return int;
+ pragma Import (C, c_kill, "kill");
+ begin
+ return c_kill (pid, sig);
+ end kill;
+
+ --------------------
+ -- Set_Time_Slice --
+ --------------------
+
+ function Set_Time_Slice (ticks : int) return int is
+ function kernelTimeSlice (ticks : int) return int;
+ pragma Import (C, kernelTimeSlice, "kernelTimeSlice");
+ begin
+ return kernelTimeSlice (ticks);
+ end Set_Time_Slice;
+
-------------
-- sigwait --
-------------
@@ -161,4 +183,13 @@ 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;