2010-12-20 Tobias Burnus <burnus@net-b.de>
[official-gcc.git] / gcc / ada / s-linux-mipsel.ads
blobc0911d8d16a7286fea5433de2aebc32f0de89f7a
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- S Y S T E M . L I N U X --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2009, Free Software Foundation, Inc. --
10 -- --
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. --
17 -- --
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. --
21 -- --
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/>. --
26 -- --
27 ------------------------------------------------------------------------------
29 -- This is the mipsel version of this package
31 -- This package encapsulates cpu specific differences between implementations
32 -- of GNU/Linux, in order to share s-osinte-linux.ads.
34 -- PLEASE DO NOT add any with-clauses to this package or remove the pragma
35 -- Preelaborate. This package is designed to be a bottom-level (leaf) package
37 package System.Linux is
38 pragma Preelaborate;
40 -----------
41 -- Errno --
42 -----------
44 EAGAIN : constant := 11;
45 EINTR : constant := 4;
46 EINVAL : constant := 22;
47 ENOMEM : constant := 12;
48 EPERM : constant := 1;
49 ETIMEDOUT : constant := 110;
51 -------------
52 -- Signals --
53 -------------
55 SIGHUP : constant := 1; -- hangup
56 SIGINT : constant := 2; -- interrupt (rubout)
57 SIGQUIT : constant := 3; -- quit (ASCD FS)
58 SIGILL : constant := 4; -- illegal instruction (not reset)
59 SIGTRAP : constant := 5; -- trace trap (not reset)
60 SIGIOT : constant := 6; -- IOT instruction
61 SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
62 SIGFPE : constant := 8; -- floating point exception
63 SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
64 SIGBUS : constant := 7; -- bus error
65 SIGSEGV : constant := 11; -- segmentation violation
66 SIGPIPE : constant := 13; -- write on a pipe with no one to read it
67 SIGALRM : constant := 14; -- alarm clock
68 SIGTERM : constant := 15; -- software termination signal from kill
69 SIGUSR1 : constant := 10; -- user defined signal 1
70 SIGUSR2 : constant := 12; -- user defined signal 2
71 SIGCLD : constant := 17; -- alias for SIGCHLD
72 SIGCHLD : constant := 17; -- child status change
73 SIGPWR : constant := 30; -- power-fail restart
74 SIGWINCH : constant := 28; -- window size change
75 SIGURG : constant := 23; -- urgent condition on IO channel
76 SIGPOLL : constant := 29; -- pollable event occurred
77 SIGIO : constant := 29; -- I/O now possible (4.2 BSD)
78 SIGLOST : constant := 29; -- File lock lost
79 SIGSTOP : constant := 19; -- stop (cannot be caught or ignored)
80 SIGTSTP : constant := 20; -- user stop requested from tty
81 SIGCONT : constant := 18; -- stopped process has been continued
82 SIGTTIN : constant := 21; -- background tty read attempted
83 SIGTTOU : constant := 22; -- background tty write attempted
84 SIGVTALRM : constant := 26; -- virtual timer expired
85 SIGPROF : constant := 27; -- profiling timer expired
86 SIGXCPU : constant := 24; -- CPU time limit exceeded
87 SIGXFSZ : constant := 25; -- filesize limit exceeded
88 SIGUNUSED : constant := 31; -- unused signal (GNU/Linux)
89 SIGSTKFLT : constant := 16; -- coprocessor stack fault (Linux)
90 SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal
91 SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal
92 SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal
94 -- struct_sigaction offsets
96 sa_handler_pos : constant := Standard'Address_Size / 8;
97 sa_mask_pos : constant := 2 * Standard'Address_Size / 8;
98 sa_flags_pos : constant := 0;
100 SA_SIGINFO : constant := 16#04#;
101 SA_ONSTACK : constant := 16#08000000#;
103 type struct_pthread_fast_lock is record
104 status : Long_Integer;
105 spinlock : Integer;
106 end record;
107 pragma Convention (C, struct_pthread_fast_lock);
109 type pthread_mutex_t is record
110 m_reserved : Integer;
111 m_count : Integer;
112 m_owner : System.Address;
113 m_kind : Integer;
114 m_lock : struct_pthread_fast_lock;
115 end record;
116 pragma Convention (C, pthread_mutex_t);
118 end System.Linux;