Subversion Repositories shark

Rev

Rev 38 | Rev 924 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 pj 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
/**
22
 ------------
158 pj 23
 CVS :        $Id: errno.h,v 1.4 2003-05-01 19:45:34 pj Exp $
2 pj 24
 
25
 File:        $File$
158 pj 26
 Revision:    $Revision: 1.4 $
27
 Last update: $Date: 2003-05-01 19:45:34 $
2 pj 28
 ------------
29
 
30
 - error codes used as values for errno
31
 - exit values used as values for sys_abort()
32
 
33
**/
34
 
35
/*
36
 * Copyright (C) 2000 Paolo Gai
37
 *
38
 * This program is free software; you can redistribute it and/or modify
39
 * it under the terms of the GNU General Public License as published by
40
 * the Free Software Foundation; either version 2 of the License, or
41
 * (at your option) any later version.
42
 *
43
 * This program is distributed in the hope that it will be useful,
44
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
45
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
46
 * GNU General Public License for more details.
47
 *
48
 * You should have received a copy of the GNU General Public License
49
 * along with this program; if not, write to the Free Software
50
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
51
 *
52
 */
53
 
54
/* Copyright (C) 1991, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
55
   This file is part of the GNU C Library.
56
 
57
   The GNU C Library is free software; you can redistribute it and/or
58
   modify it under the terms of the GNU Library General Public License as
59
   published by the Free Software Foundation; either version 2 of the
60
   License, or (at your option) any later version.
61
 
62
   The GNU C Library is distributed in the hope that it will be useful,
63
   but WITHOUT ANY WARRANTY; without even the implied warranty of
64
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
65
   Library General Public License for more details.
66
 
67
   You should have received a copy of the GNU Library General Public
68
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
69
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
70
   Boston, MA 02111-1307, USA.  */
71
 
72
/*
73
#define ETH_ERROR_BASE          150
74
#define ETH_DRIVER_NOT_FOUND    (ETH_ERROR_BASE+0)
75
#define ETH_RXERROR             (ETH_ERROR_BASE+1)
76
#define ETH_DRIVER_RELEASE      (ETH_ERROR_BASE+2)
77
#define ETH_DRIVER_ADDRESS      (ETH_ERROR_BASE+3)
78
#define ETH_TXERROR             (ETH_ERROR_BASE+4)
79
#define ETH_PROTOCOL_ERROR      (ETH_ERROR_BASE+5)
80
#define ETH_BUFFERS_FULL        (ETH_ERROR_BASE+6)
81
#define ETH_NULLPROTOCOL_EXC    (ETH_ERROR_BASE+7)
82
*/
83
 
84
#ifndef __BITS_ERRNO_H__
85
#define __BITS_ERRNO_H__
86
 
87
#include <ll/errno.h>
88
 
89
/*---------------------------------------------------------------------*/
90
/* Abort values                                                        */
91
/*---------------------------------------------------------------------*/
92
 
158 pj 93
/* note: when changing these numbers, please also change their description
94
   into kernel/kern.c */
95
 
2 pj 96
#define LAST_ABORT_NUMBER        5
97
 
98
// the number 1 is a generic error of the lowlevel
99
#define ASIG_DEFAULT_ACTION      2   /* really_deliver-signal */
100
#define ASIGINIT                 3   /* Error in signal_init */
101
#define AHEXC                    4   /* Default Hartik exception handler*/
102
#define AARPFULL                 5   /* ARP table Full */
103
 
104
/*---------------------------------------------------------------------*/
158 pj 105
/* S.Ha.R.K. exception values                                          */
2 pj 106
/*---------------------------------------------------------------------*/
107
 
158 pj 108
/* note: when changing these numbers, please also change their description
109
   into kernel/exchand.c */
110
 
2 pj 111
#define LAST_EXC_NUMBER         19
112
 
38 pj 113
// NOW UNUSED: XDOUBLE_EXCEPTION        1
9 pj 114
#define XINVALID_KILL_SHADOW     2 /* task_makefree */
2 pj 115
#define XNOMORE_CLEANUPS         3 /* task_cleanup_push */
9 pj 116
#define XINVALID_TASK            4 /* invalid operation for a task  */
38 pj 117
// NOW UNUSED: XINVALID_GUEST    5 /* invalid operation for a guest task  */
2 pj 118
#define XNOMORE_EVENTS           6 /* too many events posted... */
119
 
120
#define XDEADLINE_MISS           7 /* PERIODIC_PCLASS, SPORADIC_PCLASS */
121
#define XWCET_VIOLATION          8 /* PERIODIC_PCLASS, SPORADIC_PCLASS */
122
#define XACTIVATION              9 /* PERIODIC_PCLASS, SPORADIC_PCLASS */
123
 
124
#define XMUTEX_OWNER_KILLED     10 /* Mutex */
9 pj 125
#define XSRP_INVALID_LOCK       11 /* SRP */
2 pj 126
 
9 pj 127
#define XINVALID_DUMMY_OP       12 /* dummy.h hope it will never called... */
128
#define XINVALID_SS_REPLENISH   13 /* kernel/mosules/ss.c */
2 pj 129
 
130
#define XARP_TABLE_FULL         14 /* drivers/net/arp.c */
131
 
132
#define NETBUFF_EXC_BASE        15
133
#define XNETBUFF_INIT_EXC       (NETBUFF_EXC_BASE + 0)
134
#define XNETBUFF_GET_EXC        (NETBUFF_EXC_BASE + 1)
135
#define XNETBUFF_ALREADYFREE_EXC (NETBUFF_EXC_BASE + 2)
136
#define XNETBUFF_RELEASE_EXC    (NETBUFF_EXC_BASE + 3)
137
 
138
#define UDP_ERROR_BASE  19
139
#define XUDP_BADCHK_EXC (0 + UDP_ERROR_BASE)
140
 
141
 
142
 
143
 
144
/*---------------------------------------------------------------------*/
145
/* errno values                                                        */
146
/*---------------------------------------------------------------------*/
147
 
148
/* this is the maximun errno offset used by this file */
149
#define LAST_ERR_NUMBER         (LAST_STDERRNO+30)
150
 
151
#define EWRONG_INT_NO           (1 + LAST_STDERRNO)  /* in handler_set & handler_remove */
152
#define EUSED_INT_NO            (2 + LAST_STDERRNO)  /* in handler_set */
153
#define EUNUSED_INT_NO          (3 + LAST_STDERRNO)  /* handler_remove */
154
#define ETOOMUCH_INITFUNC       (4 + LAST_STDERRNO)  /* sys_atinit */
155
#define ETOOMUCH_EXITFUNC       (5 + LAST_STDERRNO)  /* sys_atexit */
156
#define ENO_AVAIL_TASK          (6 + LAST_STDERRNO)  /* task_create */
157
#define ENO_AVAIL_SCHEDLEVEL    (7 + LAST_STDERRNO)  /* task_create */
38 pj 158
/* NOW UNUSED: ETASK_CREATE     (8 + LAST_STDERRNO)   task_create */
2 pj 159
#define ENO_AVAIL_RESLEVEL      (9 + LAST_STDERRNO)  /* task_create */
160
#define ENO_GUARANTEE          (10 + LAST_STDERRNO)  /* task_create */
161
#define ENO_AVAIL_STACK_MEM    (11 + LAST_STDERRNO)  /* task_create */
162
#define ENO_AVAIL_TSS          (12 + LAST_STDERRNO)  /* task_create */
9 pj 163
#define EINVALID_KILL          (13 + LAST_STDERRNO)  /* task_kill */
164
#define EINVALID_TASK_ID       (14 + LAST_STDERRNO)  /* task_activate */
165
#define EINVALID_GROUP         (15 + LAST_STDERRNO)  /* group_activate e group_kill */
2 pj 166
 
167
#define EPORT_NO_MORE_DESCR    (16 + LAST_STDERRNO)
168
#define EPORT_NO_MORE_INTERF   (17 + LAST_STDERRNO)
169
#define EPORT_INCOMPAT_MESSAGE (18 + LAST_STDERRNO)
170
#define EPORT_ALREADY_OPEN     (19 + LAST_STDERRNO)
171
#define EPORT_NO_MORE_HASHENTRY (20+ LAST_STDERRNO)
172
#define EPORT_2_CONNECT        (21 + LAST_STDERRNO)
173
#define EPORT_UNSUPPORTED_ACC  (22 + LAST_STDERRNO)
174
#define EPORT_WRONG_OP         (23 + LAST_STDERRNO)
175
#define EPORT_WRONG_TYPE       (24 + LAST_STDERRNO)
9 pj 176
#define EPORT_INVALID_DESCR    (25 + LAST_STDERRNO)
2 pj 177
 
9 pj 178
#define ECAB_INVALID_ID        (26 + LAST_STDERRNO)
2 pj 179
#define ECAB_CLOSED            (27 + LAST_STDERRNO)
9 pj 180
#define ECAB_INVALID_MSG_NUM   (28 + LAST_STDERRNO)
2 pj 181
#define ECAB_NO_MORE_ENTRY     (29 + LAST_STDERRNO)
182
#define ECAB_TOO_MUCH_MSG      (30 + LAST_STDERRNO)
183
 
184
 
185
#endif
186