1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . L I N U X --
9 -- Copyright (C) 2009-2023, 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 3, or (at your option) any later ver- --
14 -- sion. GNAT 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. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
28 ------------------------------------------------------------------------------
30 -- This is the SPARC version of this package
32 -- This package encapsulates cpu specific differences between implementations
33 -- of GNU/Linux, in order to share s-osinte-linux.ads.
35 -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
36 -- Preelaborate. This package is designed to be a bottom-level (leaf) package
39 with System
.Parameters
;
41 package System
.Linux
is
48 subtype long
is Interfaces
.C
.long
;
49 subtype suseconds_t
is Interfaces
.C
.long
;
50 type time_t
is range -2 ** (System
.Parameters
.time_t_bits
- 1)
51 .. 2 ** (System
.Parameters
.time_t_bits
- 1) - 1;
52 subtype clockid_t
is Interfaces
.C
.int
;
54 type timespec
is record
58 pragma Convention
(C
, timespec
);
60 type timeval
is record
62 tv_usec
: suseconds_t
;
64 pragma Convention
(C
, timeval
);
70 EAGAIN
: constant := 11;
71 EINTR
: constant := 4;
72 EINVAL
: constant := 22;
73 ENOMEM
: constant := 12;
74 EPERM
: constant := 1;
75 ETIMEDOUT
: constant := 60;
81 SIGHUP
: constant := 1; -- hangup
82 SIGINT
: constant := 2; -- interrupt (rubout)
83 SIGQUIT
: constant := 3; -- quit (ASCD FS)
84 SIGILL
: constant := 4; -- illegal instruction (not reset)
85 SIGTRAP
: constant := 5; -- trace trap (not reset)
86 SIGABRT
: constant := 6; -- used by abort, replace SIGIOT in the future
87 SIGIOT
: constant := 6; -- IOT instruction
88 SIGEMT
: constant := 7; -- EMT
89 SIGFPE
: constant := 8; -- floating point exception
90 SIGKILL
: constant := 9; -- kill (cannot be caught or ignored)
91 SIGBUS
: constant := 10; -- bus error
92 SIGSEGV
: constant := 11; -- segmentation violation
93 SIGSYS
: constant := 12; -- bad system call
94 SIGPIPE
: constant := 13; -- write on a pipe with no one to read it
95 SIGALRM
: constant := 14; -- alarm clock
96 SIGTERM
: constant := 15; -- software termination signal from kill
97 SIGURG
: constant := 16; -- urgent condition on IO channel
98 SIGSTOP
: constant := 17; -- stop (cannot be caught or ignored)
99 SIGTSTP
: constant := 18; -- user stop requested from tty
100 SIGCONT
: constant := 19; -- stopped process has been continued
101 SIGCHLD
: constant := 20; -- child status change
102 SIGCLD
: constant := 20; -- alias for SIGCHLD
103 SIGTTIN
: constant := 21; -- background tty read attempted
104 SIGTTOU
: constant := 22; -- background tty write attempted
105 SIGIO
: constant := 23; -- I/O now possible (4.2 BSD)
106 SIGPOLL
: constant := 23; -- pollable event occurred
107 SIGXCPU
: constant := 24; -- CPU time limit exceeded
108 SIGXFSZ
: constant := 25; -- filesize limit exceeded
109 SIGVTALRM
: constant := 26; -- virtual timer expired
110 SIGPROF
: constant := 27; -- profiling timer expired
111 SIGWINCH
: constant := 28; -- window size change
112 SIGLOST
: constant := 29; -- File lock lost
113 SIGPWR
: constant := 29; -- power-fail restart
114 SIGUSR1
: constant := 30; -- user defined signal 1
115 SIGUSR2
: constant := 31; -- user defined signal 2
117 SIG32
: constant := 32; -- glibc internal signal
118 SIG33
: constant := 33; -- glibc internal signal
119 SIG34
: constant := 34; -- glibc internal signal
121 SIGUNUSED
: constant := 0;
122 SIGSTKFLT
: constant := 0;
123 -- These don't exist for Linux/SPARC. The constants are present
124 -- so that we can continue to use a-intnam-linux.ads.
126 -- struct_sigaction offsets
128 sa_handler_pos
: constant := 0;
129 sa_mask_pos
: constant := Standard
'Address_Size / 8;
130 sa_flags_pos
: constant := 128 + sa_mask_pos
;
132 SA_SIGINFO
: constant := 16#
200#
;
133 SA_ONSTACK
: constant := 16#
001#
;