summaryrefslogtreecommitdiff
path: root/gcc/ada/s-linux-alpha.ads
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-04-08 08:43:15 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-04-08 08:43:15 +0200
commit770db697e62902a236c8cb4cf0e8b6cc52051703 (patch)
tree0e9bcf675dab91b0449162ce9f89d2a5215ca347 /gcc/ada/s-linux-alpha.ads
parent42c3898c1d9a5351eaac6ffd792a5d1aaa268435 (diff)
downloadgcc-770db697e62902a236c8cb4cf0e8b6cc52051703.tar.gz
s-osinte-linux-alpha.ads, [...]: Removed.
2008-04-08 Eric Botcazou <ebotcazou@adacore.com> Arnaud Charlet <charlet@adacore.com> * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads: Removed. s-taspri-posix-noaltstack.ads, s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads: New files. Disable alternate stack on ia64-hpux. * s-osinte-lynxos-3.ads, (Alternate_Stack): Remove when not needed. Simplify declaration otherwise. (Alternate_Stack_Size): New constant. s-osinte-mingw.ads, s-taprop-mingw.adb: Code clean up: avoid use of 'Unrestricted_Access. * s-osinte-hpux.ads, s-osinte-solaris-posix.ads, s-osinte-aix.ads, s-osinte-lynxos.ads, s-osinte-freebsd.ads s-osinte-darwin.ads, s-osinte-tru64.ads, s-osinte-irix.ads, s-osinte-linux.ads, s-osinte-solaris.ads, s-osinte-vms.ads (SA_ONSTACK): New constant. (stack_t): New record type. (sigaltstack): New imported function. (Alternate_Stack): New imported variable. (Alternate_Stack_Size): New constant. * system-linux-x86_64.ads: (Stack_Check_Probes): Set to True. * s-taspri-lynxos.ads, s-taspri-solaris.ads, s-taspri-tru64.ads, s-taspri-hpux-dce.ads (Task_Address): New subtype of System.Address (Task_Address_Size): New constant size of System.Address (Alternate_Stack_Size): New constant. * s-taprop-posix.adb, s-taprop-linux.adb (Get_Stack_Attributes): Delete. (Enter_Task): Do not notify stack to System.Stack_Checking.Operations. Establish the alternate stack if the platform makes use of n alternate signal stack for stack overflows. (Create_Task): Take into account the alternate stack in the stack size. (Initialize): Save the address of the alternate stack into the ATCB for the environment task. (Create_Task): Fix assertions for NPTL library (vs old LinuxThreads). * s-parame.adb (Minimum_Stack_Size): Increase value to 16K to * system-linux-x86.ads: (Stack_Check_Probes): Set to True. * s-intman-posix.adb: (Initialize): Set SA_ONSTACK for SIGSEGV if the platform makes use of an alternate signal stack for stack overflows. * init.c (__gnat_adjust_context_for_raise, Linux version): On i386 and x86-64, adjust the saved value of the stack pointer if the signal was raised by a stack checking probe. (HP-UX section): Use global __gnat_alternate_stack as signal handler stack and only for SIGSEGV. (Linux section): Likewise on x86 and x86-64. [VxWorks section] (__gnat_map_signal): Now static. (__gnat_error_handler): Not static any more. (__gnat_adjust_context_for_raise): New function. Signal context adjustment for PPC && !VTHREADS && !RTP, as required by the zcx propagation circuitry. (__gnat_error_handler): Second argument of a sigaction handler is a pointer, not an int, and is unused. Adjust signal context before mapping to exception. Install signal handlers for LynxOS case. * s-taskin.ads (Common_ATCB): New field Task_Alternate_Stack. (Task_Id): Set size to Task_Address_Size (To_Task_id): Unchecked convert from Task_Address vice System.Address (To_Address): Unchecked convert to Task_Address vice System.Address * s-tassta.adb (Task_Wrapper): Define the alternate stack and save its address into the ATCB if the platform makes use of an alternate signal stack for stack overflows. (Free_Task): Add call to Finalize_Attributes_Link. Add argument Relative_Deadline to pass the value specified for the task. This is not yet used for any target. * s-tassta.ads (Create_Task): Add argument Relative_Deadline to pass the value specified for the task. From-SVN: r134004
Diffstat (limited to 'gcc/ada/s-linux-alpha.ads')
-rw-r--r--gcc/ada/s-linux-alpha.ads119
1 files changed, 119 insertions, 0 deletions
diff --git a/gcc/ada/s-linux-alpha.ads b/gcc/ada/s-linux-alpha.ads
new file mode 100644
index 00000000000..b2fd28f5672
--- /dev/null
+++ b/gcc/ada/s-linux-alpha.ads
@@ -0,0 +1,119 @@
+------------------------------------------------------------------------------
+-- --
+-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
+-- --
+-- S Y S T E M . L I N U X --
+-- --
+-- S p e c --
+-- --
+-- Copyright (C) 2008, 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- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNARL; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+------------------------------------------------------------------------------
+
+-- This is the alpha version of this package
+
+-- This package encapsulates cpu specific differences between implementations
+-- of GNU/Linux, in order to share s-osinte-linux.ads.
+
+-- PLEASE DO NOT add any with-clauses to this package or remove the pragma
+-- Preelaborate. This package is designed to be a bottom-level (leaf) package.
+
+with Interfaces.C;
+
+package System.Linux is
+ pragma Preelaborate;
+
+ -----------
+ -- Errno --
+ -----------
+
+ EAGAIN : constant := 35;
+ EINTR : constant := 4;
+ EINVAL : constant := 22;
+ ENOMEM : constant := 12;
+ EPERM : constant := 1;
+ ETIMEDOUT : constant := 60;
+
+ -------------
+ -- Signals --
+ -------------
+
+ SIGHUP : constant := 1; -- hangup
+ SIGINT : constant := 2; -- interrupt (rubout)
+ SIGQUIT : constant := 3; -- quit (ASCD FS)
+ SIGILL : constant := 4; -- illegal instruction (not reset)
+ SIGTRAP : constant := 5; -- trace trap (not reset)
+ SIGIOT : constant := 6; -- IOT instruction
+ SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
+ SIGFPE : constant := 8; -- floating point exception
+ SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
+ SIGBUS : constant := 10; -- bus error
+ SIGSEGV : constant := 11; -- segmentation violation
+ SIGPIPE : constant := 13; -- write on a pipe with no one to read it
+ SIGALRM : constant := 14; -- alarm clock
+ SIGTERM : constant := 15; -- software termination signal from kill
+ SIGURG : constant := 16; -- urgent condition on IO channel
+ SIGSTOP : constant := 17; -- stop (cannot be caught or ignored)
+ SIGTSTP : constant := 18; -- user stop requested from tty
+ SIGCONT : constant := 19; -- stopped process has been continued
+ SIGCLD : constant := 20; -- alias for SIGCHLD
+ SIGCHLD : constant := 20; -- child status change
+ SIGTTIN : constant := 21; -- background tty read attempted
+ SIGTTOU : constant := 22; -- background tty write attempted
+ SIGIO : constant := 23; -- I/O now possible (4.2 BSD)
+ SIGPOLL : constant := 23; -- pollable event occurred
+ SIGXCPU : constant := 24; -- CPU time limit exceeded
+ SIGXFSZ : constant := 25; -- filesize limit exceeded
+ SIGVTALRM : constant := 26; -- virtual timer expired
+ SIGPROF : constant := 27; -- profiling timer expired
+ SIGWINCH : constant := 28; -- window size change
+ SIGPWR : constant := 29; -- power-fail restart
+ SIGUSR1 : constant := 30; -- user defined signal 1
+ SIGUSR2 : constant := 31; -- user defined signal 2
+
+ SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal
+ SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal
+ SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal
+
+ SIGADAABORT : constant := SIGABRT;
+ -- Change this if you want to use another signal for task abort.
+ -- SIGTERM might be a good one.
+
+ SIGUNUSED : constant := 0;
+ SIGSTKFLT : constant := 0;
+ SIGLOST : constant := 0;
+ -- These don't exist for Linux/Alpha. The constants are present
+ -- so that we can continue to use a-intnam-linux.ads.
+
+ -- struct_sigaction offsets
+
+ sa_mask_pos : constant := Standard'Address_Size / 8;
+ sa_flags_pos : constant := 128 + sa_mask_pos;
+
+ SA_SIGINFO : constant := 16#40#;
+ SA_ONSTACK : constant := 16#01#;
+
+ type pthread_mutex_t is record
+ dum0, dum1, dum2, dum3, dum4 : Interfaces.C.unsigned_long;
+ end record;
+ pragma Convention (C, pthread_mutex_t);
+
+end System.Linux;