1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . L I N U X --
9 -- Copyright (C) 2008, Free Software Foundation, Inc. --
11 -- GNARL is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 2, or (at your option) any later ver- --
14 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNARL; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
29 ------------------------------------------------------------------------------
31 -- This is the alpha version of this package
33 -- This package encapsulates cpu specific differences between implementations
34 -- of GNU/Linux, in order to share s-osinte-linux.ads.
36 -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
37 -- Preelaborate. This package is designed to be a bottom-level (leaf) package.
41 package System
.Linux
is
48 EAGAIN
: constant := 35;
49 EINTR
: constant := 4;
50 EINVAL
: constant := 22;
51 ENOMEM
: constant := 12;
52 EPERM
: constant := 1;
53 ETIMEDOUT
: constant := 60;
59 SIGHUP
: constant := 1; -- hangup
60 SIGINT
: constant := 2; -- interrupt (rubout)
61 SIGQUIT
: constant := 3; -- quit (ASCD FS)
62 SIGILL
: constant := 4; -- illegal instruction (not reset)
63 SIGTRAP
: constant := 5; -- trace trap (not reset)
64 SIGIOT
: constant := 6; -- IOT instruction
65 SIGABRT
: constant := 6; -- used by abort, replace SIGIOT in the future
66 SIGFPE
: constant := 8; -- floating point exception
67 SIGKILL
: constant := 9; -- kill (cannot be caught or ignored)
68 SIGBUS
: constant := 10; -- bus error
69 SIGSEGV
: constant := 11; -- segmentation violation
70 SIGPIPE
: constant := 13; -- write on a pipe with no one to read it
71 SIGALRM
: constant := 14; -- alarm clock
72 SIGTERM
: constant := 15; -- software termination signal from kill
73 SIGURG
: constant := 16; -- urgent condition on IO channel
74 SIGSTOP
: constant := 17; -- stop (cannot be caught or ignored)
75 SIGTSTP
: constant := 18; -- user stop requested from tty
76 SIGCONT
: constant := 19; -- stopped process has been continued
77 SIGCLD
: constant := 20; -- alias for SIGCHLD
78 SIGCHLD
: constant := 20; -- child status change
79 SIGTTIN
: constant := 21; -- background tty read attempted
80 SIGTTOU
: constant := 22; -- background tty write attempted
81 SIGIO
: constant := 23; -- I/O now possible (4.2 BSD)
82 SIGPOLL
: constant := 23; -- pollable event occurred
83 SIGXCPU
: constant := 24; -- CPU time limit exceeded
84 SIGXFSZ
: constant := 25; -- filesize limit exceeded
85 SIGVTALRM
: constant := 26; -- virtual timer expired
86 SIGPROF
: constant := 27; -- profiling timer expired
87 SIGWINCH
: constant := 28; -- window size change
88 SIGPWR
: constant := 29; -- power-fail restart
89 SIGUSR1
: constant := 30; -- user defined signal 1
90 SIGUSR2
: constant := 31; -- user defined signal 2
92 SIGLTHRRES
: constant := 32; -- GNU/LinuxThreads restart signal
93 SIGLTHRCAN
: constant := 33; -- GNU/LinuxThreads cancel signal
94 SIGLTHRDBG
: constant := 34; -- GNU/LinuxThreads debugger signal
96 SIGADAABORT
: constant := SIGABRT
;
97 -- Change this if you want to use another signal for task abort.
98 -- SIGTERM might be a good one.
100 SIGUNUSED
: constant := 0;
101 SIGSTKFLT
: constant := 0;
102 SIGLOST
: constant := 0;
103 -- These don't exist for Linux/Alpha. The constants are present
104 -- so that we can continue to use a-intnam-linux.ads.
106 -- struct_sigaction offsets
108 sa_mask_pos
: constant := Standard
'Address_Size / 8;
109 sa_flags_pos
: constant := 128 + sa_mask_pos
;
111 SA_SIGINFO
: constant := 16#
40#
;
112 SA_ONSTACK
: constant := 16#
01#
;
114 type pthread_mutex_t
is record
115 dum0
, dum1
, dum2
, dum3
, dum4
: Interfaces
.C
.unsigned_long
;
117 pragma Convention
(C
, pthread_mutex_t
);