1 ------------------------------------------------------------------------------
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
5 -- S Y S T E M . L I N U X --
9 -- Copyright (C) 2013-2014, Free Software Foundation, Inc. --
12 -- GNARL is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 3, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. --
19 -- As a special exception under Section 7 of GPL version 3, you are granted --
20 -- additional permissions described in the GCC Runtime Library Exception, --
21 -- version 3.1, as published by the Free Software Foundation. --
23 -- You should have received a copy of the GNU General Public License and --
24 -- a copy of the GCC Runtime Library Exception along with this program; --
25 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
26 -- <http://www.gnu.org/licenses/>. --
29 ------------------------------------------------------------------------------
31 -- This is the x32 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
39 package System
.Linux
is
46 type time_t
is new Long_Long_Integer;
48 type timespec
is record
50 tv_nsec
: Long_Long_Integer;
52 pragma Convention
(C
, timespec
);
54 type timeval
is record
56 tv_usec
: Long_Long_Integer;
58 pragma Convention
(C
, timeval
);
64 EAGAIN
: constant := 11;
65 EINTR
: constant := 4;
66 EINVAL
: constant := 22;
67 ENOMEM
: constant := 12;
68 EPERM
: constant := 1;
69 ETIMEDOUT
: constant := 110;
75 SIGHUP
: constant := 1; -- hangup
76 SIGINT
: constant := 2; -- interrupt (rubout)
77 SIGQUIT
: constant := 3; -- quit (ASCD FS)
78 SIGILL
: constant := 4; -- illegal instruction (not reset)
79 SIGTRAP
: constant := 5; -- trace trap (not reset)
80 SIGIOT
: constant := 6; -- IOT instruction
81 SIGABRT
: constant := 6; -- used by abort, replace SIGIOT in the future
82 SIGFPE
: constant := 8; -- floating point exception
83 SIGKILL
: constant := 9; -- kill (cannot be caught or ignored)
84 SIGBUS
: constant := 7; -- bus error
85 SIGSEGV
: constant := 11; -- segmentation violation
86 SIGPIPE
: constant := 13; -- write on a pipe with no one to read it
87 SIGALRM
: constant := 14; -- alarm clock
88 SIGTERM
: constant := 15; -- software termination signal from kill
89 SIGUSR1
: constant := 10; -- user defined signal 1
90 SIGUSR2
: constant := 12; -- user defined signal 2
91 SIGCLD
: constant := 17; -- alias for SIGCHLD
92 SIGCHLD
: constant := 17; -- child status change
93 SIGPWR
: constant := 30; -- power-fail restart
94 SIGWINCH
: constant := 28; -- window size change
95 SIGURG
: constant := 23; -- urgent condition on IO channel
96 SIGPOLL
: constant := 29; -- pollable event occurred
97 SIGIO
: constant := 29; -- I/O now possible (4.2 BSD)
98 SIGLOST
: constant := 29; -- File lock lost
99 SIGSTOP
: constant := 19; -- stop (cannot be caught or ignored)
100 SIGTSTP
: constant := 20; -- user stop requested from tty
101 SIGCONT
: constant := 18; -- stopped process has been continued
102 SIGTTIN
: constant := 21; -- background tty read attempted
103 SIGTTOU
: constant := 22; -- background tty write attempted
104 SIGVTALRM
: constant := 26; -- virtual timer expired
105 SIGPROF
: constant := 27; -- profiling timer expired
106 SIGXCPU
: constant := 24; -- CPU time limit exceeded
107 SIGXFSZ
: constant := 25; -- filesize limit exceeded
108 SIGUNUSED
: constant := 31; -- unused signal (GNU/Linux)
109 SIGSTKFLT
: constant := 16; -- coprocessor stack fault (Linux)
110 SIGLTHRRES
: constant := 32; -- GNU/LinuxThreads restart signal
111 SIGLTHRCAN
: constant := 33; -- GNU/LinuxThreads cancel signal
112 SIGLTHRDBG
: constant := 34; -- GNU/LinuxThreads debugger signal
114 -- struct_sigaction offsets
116 sa_handler_pos
: constant := 0;
117 sa_mask_pos
: constant := Standard
'Address_Size / 8;
118 sa_flags_pos
: constant := 128 + sa_mask_pos
;
120 SA_SIGINFO
: constant := 16#
04#
;
121 SA_ONSTACK
: constant := 16#
08000000#
;