annotate gcc/ada/libgnarl/s-linux__android.ads @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- S Y S T E M . L I N U X --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
kono
parents:
diff changeset
9 -- Copyright (C) 2014-2017, Free Software Foundation, Inc. --
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNARL is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
kono
parents:
diff changeset
17 -- --
kono
parents:
diff changeset
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
kono
parents:
diff changeset
19 -- additional permissions described in the GCC Runtime Library Exception, --
kono
parents:
diff changeset
20 -- version 3.1, as published by the Free Software Foundation. --
kono
parents:
diff changeset
21 -- --
kono
parents:
diff changeset
22 -- In particular, you can freely distribute your programs built with the --
kono
parents:
diff changeset
23 -- GNAT Pro compiler, including any required library run-time units, using --
kono
parents:
diff changeset
24 -- any licensing terms of your choosing. See the AdaCore Software License --
kono
parents:
diff changeset
25 -- for full details. --
kono
parents:
diff changeset
26 -- --
kono
parents:
diff changeset
27 -- --
kono
parents:
diff changeset
28 ------------------------------------------------------------------------------
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 -- This is the Android version of this package
kono
parents:
diff changeset
31
kono
parents:
diff changeset
32 -- This package encapsulates cpu specific differences between implementations
kono
parents:
diff changeset
33 -- of GNU/Linux, in order to share s-osinte-linux.ads.
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
kono
parents:
diff changeset
36 -- Preelaborate. This package is designed to be a bottom-level (leaf) package
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 with Interfaces.C;
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 package System.Linux is
kono
parents:
diff changeset
41 pragma Preelaborate;
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 ----------
kono
parents:
diff changeset
44 -- Time --
kono
parents:
diff changeset
45 ----------
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 subtype long is Interfaces.C.long;
kono
parents:
diff changeset
48 subtype suseconds_t is Interfaces.C.long;
kono
parents:
diff changeset
49 subtype time_t is Interfaces.C.long;
kono
parents:
diff changeset
50 subtype clockid_t is Interfaces.C.int;
kono
parents:
diff changeset
51
kono
parents:
diff changeset
52 type timespec is record
kono
parents:
diff changeset
53 tv_sec : time_t;
kono
parents:
diff changeset
54 tv_nsec : long;
kono
parents:
diff changeset
55 end record;
kono
parents:
diff changeset
56 pragma Convention (C, timespec);
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 type timeval is record
kono
parents:
diff changeset
59 tv_sec : time_t;
kono
parents:
diff changeset
60 tv_usec : suseconds_t;
kono
parents:
diff changeset
61 end record;
kono
parents:
diff changeset
62 pragma Convention (C, timeval);
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 -----------
kono
parents:
diff changeset
65 -- Errno --
kono
parents:
diff changeset
66 -----------
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 EAGAIN : constant := 11;
kono
parents:
diff changeset
69 EINTR : constant := 4;
kono
parents:
diff changeset
70 EINVAL : constant := 22;
kono
parents:
diff changeset
71 ENOMEM : constant := 12;
kono
parents:
diff changeset
72 EPERM : constant := 1;
kono
parents:
diff changeset
73 ETIMEDOUT : constant := 110;
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 -------------
kono
parents:
diff changeset
76 -- Signals --
kono
parents:
diff changeset
77 -------------
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 SIGHUP : constant := 1; -- hangup
kono
parents:
diff changeset
80 SIGINT : constant := 2; -- interrupt (rubout)
kono
parents:
diff changeset
81 SIGQUIT : constant := 3; -- quit (ASCD FS)
kono
parents:
diff changeset
82 SIGILL : constant := 4; -- illegal instruction (not reset)
kono
parents:
diff changeset
83 SIGTRAP : constant := 5; -- trace trap (not reset)
kono
parents:
diff changeset
84 SIGIOT : constant := 6; -- IOT instruction
kono
parents:
diff changeset
85 SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
kono
parents:
diff changeset
86 SIGFPE : constant := 8; -- floating point exception
kono
parents:
diff changeset
87 SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
kono
parents:
diff changeset
88 SIGBUS : constant := 7; -- bus error
kono
parents:
diff changeset
89 SIGSEGV : constant := 11; -- segmentation violation
kono
parents:
diff changeset
90 SIGPIPE : constant := 13; -- write on a pipe with no one to read it
kono
parents:
diff changeset
91 SIGALRM : constant := 14; -- alarm clock
kono
parents:
diff changeset
92 SIGTERM : constant := 15; -- software termination signal from kill
kono
parents:
diff changeset
93 SIGUSR1 : constant := 10; -- user defined signal 1
kono
parents:
diff changeset
94 SIGUSR2 : constant := 12; -- user defined signal 2
kono
parents:
diff changeset
95 SIGCLD : constant := 17; -- alias for SIGCHLD
kono
parents:
diff changeset
96 SIGCHLD : constant := 17; -- child status change
kono
parents:
diff changeset
97 SIGPWR : constant := 30; -- power-fail restart
kono
parents:
diff changeset
98 SIGWINCH : constant := 28; -- window size change
kono
parents:
diff changeset
99 SIGURG : constant := 23; -- urgent condition on IO channel
kono
parents:
diff changeset
100 SIGPOLL : constant := 29; -- pollable event occurred
kono
parents:
diff changeset
101 SIGIO : constant := 29; -- I/O now possible (4.2 BSD)
kono
parents:
diff changeset
102 SIGLOST : constant := 29; -- File lock lost
kono
parents:
diff changeset
103 SIGSTOP : constant := 19; -- stop (cannot be caught or ignored)
kono
parents:
diff changeset
104 SIGTSTP : constant := 20; -- user stop requested from tty
kono
parents:
diff changeset
105 SIGCONT : constant := 18; -- stopped process has been continued
kono
parents:
diff changeset
106 SIGTTIN : constant := 21; -- background tty read attempted
kono
parents:
diff changeset
107 SIGTTOU : constant := 22; -- background tty write attempted
kono
parents:
diff changeset
108 SIGVTALRM : constant := 26; -- virtual timer expired
kono
parents:
diff changeset
109 SIGPROF : constant := 27; -- profiling timer expired
kono
parents:
diff changeset
110 SIGXCPU : constant := 24; -- CPU time limit exceeded
kono
parents:
diff changeset
111 SIGXFSZ : constant := 25; -- filesize limit exceeded
kono
parents:
diff changeset
112 SIGUNUSED : constant := 31; -- unused signal (GNU/Linux)
kono
parents:
diff changeset
113 SIGSTKFLT : constant := 16; -- coprocessor stack fault (Linux)
kono
parents:
diff changeset
114 SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal
kono
parents:
diff changeset
115 SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal
kono
parents:
diff changeset
116 SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 -- struct_sigaction offsets
kono
parents:
diff changeset
119
kono
parents:
diff changeset
120 sa_handler_pos : constant := 0;
kono
parents:
diff changeset
121 sa_mask_pos : constant := Standard'Address_Size / 8;
kono
parents:
diff changeset
122 sa_flags_pos : constant := 4 + sa_mask_pos;
kono
parents:
diff changeset
123
kono
parents:
diff changeset
124 SA_SIGINFO : constant := 16#00000004#;
kono
parents:
diff changeset
125 SA_ONSTACK : constant := 16#08000000#;
kono
parents:
diff changeset
126 SA_RESTART : constant := 16#10000000#;
kono
parents:
diff changeset
127 SA_NODEFER : constant := 16#40000000#;
kono
parents:
diff changeset
128
kono
parents:
diff changeset
129 end System.Linux;