diff options
author | Ed Falis <falis@adacore.com> | 2009-04-15 12:45:27 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-15 14:45:27 +0200 |
commit | 3405870d5aadb353ada9c15c886b1cc13d9fd339 (patch) | |
tree | beda84bc2b3b82ca573f3ede2119cb40501101ee | |
parent | 1f07382dbe0844687cb1f2d0bcfe2daae1df9745 (diff) | |
download | gcc-3405870d5aadb353ada9c15c886b1cc13d9fd339.zip gcc-3405870d5aadb353ada9c15c886b1cc13d9fd339.tar.gz gcc-3405870d5aadb353ada9c15c886b1cc13d9fd339.tar.bz2 |
Reorganize code.
From-SVN: r146109
-rw-r--r-- | gcc/ada/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/ada/s-vxwext-rtp.adb | 53 | ||||
-rw-r--r-- | gcc/ada/s-vxwext-rtp.ads | 31 |
3 files changed, 60 insertions, 27 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4a33250..6872b65 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -28,7 +28,8 @@ * s-osinte-vxworks-kernel.adb, s-osinte-vxworks.adb, s-osinte-vxworks.ads s-vxwext.ads, s-vxwext-kernel.adb, - s-vxwext-kernel.ads: Reorganize s-osinte-vxworks* and s-vxwext*. + s-vxwext-kernel.ads, s-vxwext-rtp.ads, s-vxwext-rtp.adb: Reorganize + s-osinte-vxworks* and s-vxwext*. 2009-04-15 Arnaud Charlet <charlet@adacore.com> diff --git a/gcc/ada/s-vxwext-rtp.adb b/gcc/ada/s-vxwext-rtp.adb index 74ff505..809ee91 100644 --- a/gcc/ada/s-vxwext-rtp.adb +++ b/gcc/ada/s-vxwext-rtp.adb @@ -26,40 +26,57 @@ -- -- ------------------------------------------------------------------------------ --- This is the VxWorks 6 rtp version of this package +-- This package provides vxworks specific support functions needed +-- by System.OS_Interface. + +-- This is the VxWorks 6 RTP version of this package package body System.VxWorks.Ext is - function Task_Cont (tid : t_id) return int is - pragma Unreferenced (tid); - begin - -- Operation not allowed in an RTP - return 0; - end Task_Cont; + ERROR : constant := -1; - function Task_Stop (tid : t_id) return int is - pragma Unreferenced (tid); - begin - -- Operation not allowed in an RTP - return 0; - end Task_Stop; + -------------- + -- Int_Lock -- + -------------- function Int_Lock return int is begin - -- Operation not allowed in an RTP - return 0; + return ERROR; end Int_Lock; + ---------------- + -- Int_Unlock -- + ---------------- + function Int_Unlock return int is begin - -- Operation not allowed in an RTP - return 0; + return ERROR; end Int_Unlock; + -------------------- + -- Set_Time_Slice -- + -------------------- + function Set_Time_Slice (ticks : int) return int is pragma Unreferenced (ticks); begin - return 0; + return ERROR; end Set_Time_Slice; + function Interrupt_Connect + (Vector : Interrupt_Vector; + Handler : Interrupt_Handler; + Parameter : System.Address := System.Null_Address) return int is + pragma Unreferenced (Vector, Handler, Parameter); + begin + return ERROR; + end Interrupt_Connect; + + function Interrupt_Number_To_Vector + (intNum : int) return Interrupt_Vector is + pragma Unreferenced (intNum); + begin + return 0; + end Interrupt_Number_To_Vector; + end System.VxWorks.Ext; diff --git a/gcc/ada/s-vxwext-rtp.ads b/gcc/ada/s-vxwext-rtp.ads index bba9cbc..8d09441 100644 --- a/gcc/ada/s-vxwext-rtp.ads +++ b/gcc/ada/s-vxwext-rtp.ads @@ -29,7 +29,7 @@ -- This package provides vxworks specific support functions needed -- by System.OS_Interface. --- This is the VxWorks 6 rtp version of this package +-- This is the VxWorks 6 RTP version of this package with Interfaces.C; @@ -39,11 +39,10 @@ package System.VxWorks.Ext is type t_id is new Long_Integer; subtype int is Interfaces.C.int; - function Task_Cont (tid : t_id) return int; - pragma Inline (Task_Cont); + type Interrupt_Handler is access procedure (parameter : System.Address); + pragma Convention (C, Interrupt_Handler); - function Task_Stop (tid : t_id) return int; - pragma Inline (Task_Stop); + type Interrupt_Vector is new System.Address; function Int_Lock return int; pragma Inline (Int_Lock); @@ -51,13 +50,29 @@ package System.VxWorks.Ext is function Int_Unlock return int; pragma Inline (Int_Unlock); + function Interrupt_Connect + (Vector : Interrupt_Vector; + Handler : Interrupt_Handler; + Parameter : System.Address := System.Null_Address) return int; + pragma Convention (C, Interrupt_Connect); + + function Interrupt_Number_To_Vector + (intNum : int) return Interrupt_Vector; + pragma Convention (C, Interrupt_Number_To_Vector); + + function Task_Cont (tid : t_id) return int; + pragma Import (C, Task_Cont, "taskResume"); + + function Task_Stop (tid : t_id) return int; + pragma Import (C, Task_Stop, "taskSuspend"); + function kill (pid : t_id; sig : int) return int; pragma Import (C, kill, "taskKill"); - function Set_Time_Slice (ticks : int) return int; - pragma Inline (Set_Time_Slice); - function getpid return t_id; pragma Import (C, getpid, "getpid"); + function Set_Time_Slice (ticks : int) return int; + pragma Inline (Set_Time_Slice); + end System.VxWorks.Ext; |