diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2008-04-22 14:15:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel@gcc.gnu.org> | 2008-04-22 14:15:04 +0000 |
commit | d9126ef8c80e03e6a32462591d688d7ccfe35ace (patch) | |
tree | d6c67a47010f336cbd4425858bfcadad62f1e183 /gcc/ada | |
parent | 5b4603fac213fa9dd3a8a82464618c2ca25f8148 (diff) | |
download | gcc-d9126ef8c80e03e6a32462591d688d7ccfe35ace.zip gcc-d9126ef8c80e03e6a32462591d688d7ccfe35ace.tar.gz gcc-d9126ef8c80e03e6a32462591d688d7ccfe35ace.tar.bz2 |
s-osinte-rtems.adb: Add sigalstack function.
2008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* s-osinte-rtems.adb: Add sigalstack function.
* s-osinte-rtems.ads: Add SO_ONSTACK and sigalstack
function. Add Alternate_Stack and Alternate_Stack_Size.
Add missing process_shared field to pthread_condattr_t
and change ss_low_priority to int from timespec.
From-SVN: r134560
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/ada/s-osinte-rtems.adb | 9 | ||||
-rw-r--r-- | gcc/ada/s-osinte-rtems.ads | 43 |
3 files changed, 52 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d4a76a6..0cf552e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com> + + * s-osinte-rtems.adb: Add sigalstack function. + * s-osinte-rtems.ads: Add SO_ONSTACK and sigalstack + function. Add Alternate_Stack and Alternate_Stack_Size. + Add missing process_shared field to pthread_condattr_t + and change ss_low_priority to int from timespec. + 2008-04-22 Samuel Tardieu <sam@rfc1149.net> * i-forbla.adb: Link against -llapack and -lblas by default diff --git a/gcc/ada/s-osinte-rtems.adb b/gcc/ada/s-osinte-rtems.adb index 494947c..1e4efbc 100644 --- a/gcc/ada/s-osinte-rtems.adb +++ b/gcc/ada/s-osinte-rtems.adb @@ -135,4 +135,13 @@ package body System.OS_Interface is return 0; end Get_Page_Size; + function sigaltstack + (ss : not null access stack_t; + oss : access stack_t) return int is + pragma Unreferenced (ss); + pragma Unreferenced (oss); + begin + return 0; + end sigaltstack; + end System.OS_Interface; diff --git a/gcc/ada/s-osinte-rtems.ads b/gcc/ada/s-osinte-rtems.ads index f28e14d..8d5483b 100644 --- a/gcc/ada/s-osinte-rtems.ads +++ b/gcc/ada/s-osinte-rtems.ads @@ -35,17 +35,21 @@ -- -- ------------------------------------------------------------------------------ --- This is the RTEMS version of this package - --- These are guesses based on what I think the GNARL team will want to --- call the rtems configurations. We use CPU-rtems for the rtems --- configurations. +-- This is the RTEMS version of this package. +-- +-- RTEMS target names are of the form CPU-rtems. +-- This implementation is designed to work on ALL RTEMS targets. +-- The RTEMS implementation is primarily based upon the POSIX threads +-- API but there are also bindings to GNAT/RTEMS support routines +-- to insulate this code from C API specific details and, in some +-- cases, obtain target architecture and BSP specific information +-- that is unavailable at the time this package is built. -- This package encapsulates all direct interfaces to OS services -- that are needed by children of System. -- PLEASE DO NOT add any with-clauses to this package --- or remove the pragma Elaborate_Body. +-- or remove the pragma Preelaborate. -- It is designed to be a bottom-level (leaf) package. with Interfaces.C; @@ -141,6 +145,11 @@ package System.OS_Interface is SA_SIGINFO : constant := 16#02#; + SA_ONSTACK : constant := 16#00#; + -- SA_ONSTACK is not defined on RTEMS, but it is refered to in the POSIX + -- implementation of System.Interrupt_Management. Therefore we define a + -- dummy value of zero here so that setting this flag is a nop. + SIG_BLOCK : constant := 1; SIG_UNBLOCK : constant := 2; SIG_SETMASK : constant := 3; @@ -249,6 +258,23 @@ package System.OS_Interface is -- Stack -- ----------- + type stack_t is record + ss_sp : System.Address; + ss_flags : int; + ss_size : size_t; + end record; + pragma Convention (C, stack_t); + + function sigaltstack + (ss : not null access stack_t; + oss : access stack_t) return int; + + Alternate_Stack : aliased System.Address; + -- This is a dummy definition, never used (Alternate_Stack_Size is null) + + Alternate_Stack_Size : constant := 0; + -- No alternate signal stack is used on this platform + Stack_Base_Available : constant Boolean := False; -- Indicates whether the stack base is available on this target. -- This allows us to share s-osinte.adb between all the FSU/RTEMS @@ -386,7 +412,7 @@ package System.OS_Interface is type struct_sched_param is record sched_priority : int; - ss_low_priority : timespec; + ss_low_priority : int; ss_replenish_period : timespec; ss_initial_budget : timespec; end record; @@ -512,7 +538,8 @@ private pragma Convention (C, pthread_attr_t); type pthread_condattr_t is record - flags : int; + flags : int; + process_shared : int; end record; pragma Convention (C, pthread_condattr_t); |