Subversion Repositories shark

Rev

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