Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/libgnarl/s-osinte__linux.ads @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
5 -- S Y S T E M . O S _ I N T E R F A C E -- | 5 -- S Y S T E M . O S _ I N T E R F A C E -- |
6 -- -- | 6 -- -- |
7 -- S p e c -- | 7 -- S p e c -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 1991-2017, Florida State University -- | 9 -- Copyright (C) 1991-2017, Florida State University -- |
10 -- Copyright (C) 1995-2018, Free Software Foundation, Inc. -- | 10 -- Copyright (C) 1995-2019, Free Software Foundation, Inc. -- |
11 -- -- | 11 -- -- |
12 -- GNAT is free software; you can redistribute it and/or modify it under -- | 12 -- GNAT 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- -- | 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- -- | 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- -- | 15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
28 -- GNARL was developed by the GNARL team at Florida State University. -- | 28 -- GNARL was developed by the GNARL team at Florida State University. -- |
29 -- Extensive contributions were provided by Ada Core Technologies, Inc. -- | 29 -- Extensive contributions were provided by Ada Core Technologies, Inc. -- |
30 -- -- | 30 -- -- |
31 ------------------------------------------------------------------------------ | 31 ------------------------------------------------------------------------------ |
32 | 32 |
33 -- This is a GNU/Linux (GNU/LinuxThreads) version of this package | 33 -- This is a GNU/Linux version of this package |
34 | 34 |
35 -- This package encapsulates all direct interfaces to OS services | 35 -- This package encapsulates all direct interfaces to OS services |
36 -- that are needed by the tasking run-time (libgnarl). | 36 -- that are needed by the tasking run-time (libgnarl). |
37 | 37 |
38 -- PLEASE DO NOT add any with-clauses to this package or remove the pragma | 38 -- PLEASE DO NOT add any with-clauses to this package or remove the pragma |
44 with System.OS_Constants; | 44 with System.OS_Constants; |
45 | 45 |
46 package System.OS_Interface is | 46 package System.OS_Interface is |
47 pragma Preelaborate; | 47 pragma Preelaborate; |
48 | 48 |
49 pragma Linker_Options ("-lpthread"); | |
50 pragma Linker_Options ("-lrt"); | 49 pragma Linker_Options ("-lrt"); |
51 -- Needed for clock_getres with glibc versions prior to 2.17 | 50 -- Needed for clock_getres with glibc versions prior to 2.17 |
51 | |
52 pragma Linker_Options ("-lpthread"); | |
52 | 53 |
53 subtype int is Interfaces.C.int; | 54 subtype int is Interfaces.C.int; |
54 subtype char is Interfaces.C.char; | 55 subtype char is Interfaces.C.char; |
55 subtype short is Interfaces.C.short; | 56 subtype short is Interfaces.C.short; |
56 subtype long is Interfaces.C.long; | 57 subtype long is Interfaces.C.long; |
88 SIGQUIT : constant := System.Linux.SIGQUIT; | 89 SIGQUIT : constant := System.Linux.SIGQUIT; |
89 SIGILL : constant := System.Linux.SIGILL; | 90 SIGILL : constant := System.Linux.SIGILL; |
90 SIGTRAP : constant := System.Linux.SIGTRAP; | 91 SIGTRAP : constant := System.Linux.SIGTRAP; |
91 SIGIOT : constant := System.Linux.SIGIOT; | 92 SIGIOT : constant := System.Linux.SIGIOT; |
92 SIGABRT : constant := System.Linux.SIGABRT; | 93 SIGABRT : constant := System.Linux.SIGABRT; |
94 SIGBUS : constant := System.Linux.SIGBUS; | |
93 SIGFPE : constant := System.Linux.SIGFPE; | 95 SIGFPE : constant := System.Linux.SIGFPE; |
94 SIGKILL : constant := System.Linux.SIGKILL; | 96 SIGKILL : constant := System.Linux.SIGKILL; |
95 SIGBUS : constant := System.Linux.SIGBUS; | 97 SIGUSR1 : constant := System.Linux.SIGUSR1; |
96 SIGSEGV : constant := System.Linux.SIGSEGV; | 98 SIGSEGV : constant := System.Linux.SIGSEGV; |
99 SIGUSR2 : constant := System.Linux.SIGUSR2; | |
97 SIGPIPE : constant := System.Linux.SIGPIPE; | 100 SIGPIPE : constant := System.Linux.SIGPIPE; |
98 SIGALRM : constant := System.Linux.SIGALRM; | 101 SIGALRM : constant := System.Linux.SIGALRM; |
99 SIGTERM : constant := System.Linux.SIGTERM; | 102 SIGTERM : constant := System.Linux.SIGTERM; |
100 SIGUSR1 : constant := System.Linux.SIGUSR1; | 103 SIGSTKFLT : constant := System.Linux.SIGSTKFLT; |
101 SIGUSR2 : constant := System.Linux.SIGUSR2; | |
102 SIGCLD : constant := System.Linux.SIGCLD; | 104 SIGCLD : constant := System.Linux.SIGCLD; |
103 SIGCHLD : constant := System.Linux.SIGCHLD; | 105 SIGCHLD : constant := System.Linux.SIGCHLD; |
104 SIGPWR : constant := System.Linux.SIGPWR; | 106 SIGCONT : constant := System.Linux.SIGCONT; |
107 SIGSTOP : constant := System.Linux.SIGSTOP; | |
108 SIGTSTP : constant := System.Linux.SIGTSTP; | |
109 SIGTTIN : constant := System.Linux.SIGTTIN; | |
110 SIGTTOU : constant := System.Linux.SIGTTOU; | |
111 SIGURG : constant := System.Linux.SIGURG; | |
112 SIGXCPU : constant := System.Linux.SIGXCPU; | |
113 SIGXFSZ : constant := System.Linux.SIGXFSZ; | |
114 SIGVTALRM : constant := System.Linux.SIGVTALRM; | |
115 SIGPROF : constant := System.Linux.SIGPROF; | |
105 SIGWINCH : constant := System.Linux.SIGWINCH; | 116 SIGWINCH : constant := System.Linux.SIGWINCH; |
106 SIGURG : constant := System.Linux.SIGURG; | |
107 SIGPOLL : constant := System.Linux.SIGPOLL; | 117 SIGPOLL : constant := System.Linux.SIGPOLL; |
108 SIGIO : constant := System.Linux.SIGIO; | 118 SIGIO : constant := System.Linux.SIGIO; |
109 SIGLOST : constant := System.Linux.SIGLOST; | 119 SIGLOST : constant := System.Linux.SIGLOST; |
110 SIGSTOP : constant := System.Linux.SIGSTOP; | 120 SIGPWR : constant := System.Linux.SIGPWR; |
111 SIGTSTP : constant := System.Linux.SIGTSTP; | 121 SIGSYS : constant := System.Linux.SIGSYS; |
112 SIGCONT : constant := System.Linux.SIGCONT; | |
113 SIGTTIN : constant := System.Linux.SIGTTIN; | |
114 SIGTTOU : constant := System.Linux.SIGTTOU; | |
115 SIGVTALRM : constant := System.Linux.SIGVTALRM; | |
116 SIGPROF : constant := System.Linux.SIGPROF; | |
117 SIGXCPU : constant := System.Linux.SIGXCPU; | |
118 SIGXFSZ : constant := System.Linux.SIGXFSZ; | |
119 SIGUNUSED : constant := System.Linux.SIGUNUSED; | 122 SIGUNUSED : constant := System.Linux.SIGUNUSED; |
120 SIGSTKFLT : constant := System.Linux.SIGSTKFLT; | 123 SIG32 : constant := System.Linux.SIG32; |
121 SIGLTHRRES : constant := System.Linux.SIGLTHRRES; | 124 SIG33 : constant := System.Linux.SIG33; |
122 SIGLTHRCAN : constant := System.Linux.SIGLTHRCAN; | 125 SIG34 : constant := System.Linux.SIG34; |
123 SIGLTHRDBG : constant := System.Linux.SIGLTHRDBG; | |
124 | 126 |
125 SIGADAABORT : constant := SIGABRT; | 127 SIGADAABORT : constant := SIGABRT; |
126 -- Change this to use another signal for task abort. SIGTERM might be a | 128 -- Change this to use another signal for task abort. SIGTERM might be a |
127 -- good one. | 129 -- good one. |
128 | 130 |
140 -- behaves as normal "C" applications | 142 -- behaves as normal "C" applications |
141 | 143 |
142 SIGPROF, | 144 SIGPROF, |
143 -- To avoid confusing the profiler | 145 -- To avoid confusing the profiler |
144 | 146 |
145 SIGKILL, SIGSTOP, | 147 SIGKILL, SIGSTOP |
146 -- These two signals actually can't be masked (POSIX won't allow it) | 148 -- These two signals actually can't be masked (POSIX won't allow it) |
147 | 149 ); |
148 SIGLTHRRES, SIGLTHRCAN, SIGLTHRDBG); | 150 |
149 -- These three signals are used by GNU/LinuxThreads starting from glibc | 151 Reserved : constant Signal_Set := ( |
150 -- 2.1 (future 2.2). | 152 SIG32, SIG33, SIG34 |
151 | 153 -- glibc POSIX threads implementation uses two (NPTL) or three |
152 Reserved : constant Signal_Set := (SIGVTALRM, SIGUNUSED); | 154 -- (LinuxThreads) real-time signals for its own use (see SIGNAL(7)). |
153 -- Not clear why these two signals are reserved. Perhaps they are not | 155 -- These signals are considered reserved and not unmasked as glibc does |
154 -- supported by this version of GNU/Linux ??? | 156 -- not permit these signals to be used by the public signal.h API. |
157 -- While LinuxThreads is mostly likely unused now, SIG34 is still | |
158 -- reserved as this behavior is consistent with past GNAT releases. | |
159 ); | |
155 | 160 |
156 type sigset_t is private; | 161 type sigset_t is private; |
157 | 162 |
158 function sigaddset (set : access sigset_t; sig : Signal) return int; | 163 function sigaddset (set : access sigset_t; sig : Signal) return int; |
159 pragma Import (C, sigaddset, "sigaddset"); | 164 pragma Import (C, sigaddset, "sigaddset"); |