Subversion Repositories shark

Rev

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

/*
 * Project: S.Ha.R.K.
 *
 * Coordinators:
 *   Giorgio Buttazzo    <giorgio@sssup.it>
 *   Paolo Gai           <pj@gandalf.sssup.it>
 *
 * Authors     :
 *   Paolo Gai           <pj@gandalf.sssup.it>
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
 *   Luca Abeni          <luca@gandalf.sssup.it>
 *   (see the web pages for full authors list)
 *
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
 *
 * http://www.sssup.it
 * http://retis.sssup.it
 * http://shark.sssup.it
 */


/**
 ------------
 CVS :        $Id: errno.h,v 1.4 2003-05-01 19:45:34 pj Exp $

 File:        $File$
 Revision:    $Revision: 1.4 $
 Last update: $Date: 2003-05-01 19:45:34 $
 ------------

 - error codes used as values for errno
 - exit values used as values for sys_abort()

**/


/*
 * Copyright (C) 2000 Paolo Gai
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */


/* Copyright (C) 1991, 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */


/*
#define ETH_ERROR_BASE          150
#define ETH_DRIVER_NOT_FOUND    (ETH_ERROR_BASE+0)
#define ETH_RXERROR             (ETH_ERROR_BASE+1)
#define ETH_DRIVER_RELEASE      (ETH_ERROR_BASE+2)
#define ETH_DRIVER_ADDRESS      (ETH_ERROR_BASE+3)
#define ETH_TXERROR             (ETH_ERROR_BASE+4)
#define ETH_PROTOCOL_ERROR      (ETH_ERROR_BASE+5)
#define ETH_BUFFERS_FULL        (ETH_ERROR_BASE+6)
#define ETH_NULLPROTOCOL_EXC    (ETH_ERROR_BASE+7)
*/


#ifndef __BITS_ERRNO_H__
#define __BITS_ERRNO_H__

#include <ll/errno.h>

/*---------------------------------------------------------------------*/
/* Abort values                                                        */
/*---------------------------------------------------------------------*/

/* note: when changing these numbers, please also change their description
   into kernel/kern.c */


#define LAST_ABORT_NUMBER        5

// the number 1 is a generic error of the lowlevel
#define ASIG_DEFAULT_ACTION      2   /* really_deliver-signal */
#define ASIGINIT                 3   /* Error in signal_init */
#define AHEXC                    4   /* Default Hartik exception handler*/
#define AARPFULL                 5   /* ARP table Full */

/*---------------------------------------------------------------------*/
/* S.Ha.R.K. exception values                                          */
/*---------------------------------------------------------------------*/

/* note: when changing these numbers, please also change their description
   into kernel/exchand.c */


#define LAST_EXC_NUMBER         19

// NOW UNUSED: XDOUBLE_EXCEPTION        1
#define XINVALID_KILL_SHADOW     2 /* task_makefree */
#define XNOMORE_CLEANUPS         3 /* task_cleanup_push */
#define XINVALID_TASK            4 /* invalid operation for a task  */
// NOW UNUSED: XINVALID_GUEST    5 /* invalid operation for a guest task  */
#define XNOMORE_EVENTS           6 /* too many events posted... */

#define XDEADLINE_MISS           7 /* PERIODIC_PCLASS, SPORADIC_PCLASS */
#define XWCET_VIOLATION          8 /* PERIODIC_PCLASS, SPORADIC_PCLASS */
#define XACTIVATION              9 /* PERIODIC_PCLASS, SPORADIC_PCLASS */

#define XMUTEX_OWNER_KILLED     10 /* Mutex */
#define XSRP_INVALID_LOCK       11 /* SRP */

#define XINVALID_DUMMY_OP       12 /* dummy.h hope it will never called... */
#define XINVALID_SS_REPLENISH   13 /* kernel/mosules/ss.c */

#define XARP_TABLE_FULL         14 /* drivers/net/arp.c */

#define NETBUFF_EXC_BASE        15
#define XNETBUFF_INIT_EXC       (NETBUFF_EXC_BASE + 0)
#define XNETBUFF_GET_EXC        (NETBUFF_EXC_BASE + 1)
#define XNETBUFF_ALREADYFREE_EXC (NETBUFF_EXC_BASE + 2)
#define XNETBUFF_RELEASE_EXC    (NETBUFF_EXC_BASE + 3)

#define UDP_ERROR_BASE  19
#define XUDP_BADCHK_EXC (0 + UDP_ERROR_BASE)




/*---------------------------------------------------------------------*/
/* errno values                                                        */
/*---------------------------------------------------------------------*/

/* this is the maximun errno offset used by this file */
#define LAST_ERR_NUMBER         (LAST_STDERRNO+30)

#define EWRONG_INT_NO           (1 + LAST_STDERRNO)  /* in handler_set & handler_remove */
#define EUSED_INT_NO            (2 + LAST_STDERRNO)  /* in handler_set */
#define EUNUSED_INT_NO          (3 + LAST_STDERRNO)  /* handler_remove */
#define ETOOMUCH_INITFUNC       (4 + LAST_STDERRNO)  /* sys_atinit */
#define ETOOMUCH_EXITFUNC       (5 + LAST_STDERRNO)  /* sys_atexit */
#define ENO_AVAIL_TASK          (6 + LAST_STDERRNO)  /* task_create */
#define ENO_AVAIL_SCHEDLEVEL    (7 + LAST_STDERRNO)  /* task_create */
/* NOW UNUSED: ETASK_CREATE     (8 + LAST_STDERRNO)   task_create */
#define ENO_AVAIL_RESLEVEL      (9 + LAST_STDERRNO)  /* task_create */
#define ENO_GUARANTEE          (10 + LAST_STDERRNO)  /* task_create */
#define ENO_AVAIL_STACK_MEM    (11 + LAST_STDERRNO)  /* task_create */
#define ENO_AVAIL_TSS          (12 + LAST_STDERRNO)  /* task_create */
#define EINVALID_KILL          (13 + LAST_STDERRNO)  /* task_kill */
#define EINVALID_TASK_ID       (14 + LAST_STDERRNO)  /* task_activate */
#define EINVALID_GROUP         (15 + LAST_STDERRNO)  /* group_activate e group_kill */

#define EPORT_NO_MORE_DESCR    (16 + LAST_STDERRNO)
#define EPORT_NO_MORE_INTERF   (17 + LAST_STDERRNO)
#define EPORT_INCOMPAT_MESSAGE (18 + LAST_STDERRNO)
#define EPORT_ALREADY_OPEN     (19 + LAST_STDERRNO)
#define EPORT_NO_MORE_HASHENTRY (20+ LAST_STDERRNO)
#define EPORT_2_CONNECT        (21 + LAST_STDERRNO)
#define EPORT_UNSUPPORTED_ACC  (22 + LAST_STDERRNO)
#define EPORT_WRONG_OP         (23 + LAST_STDERRNO)
#define EPORT_WRONG_TYPE       (24 + LAST_STDERRNO)
#define EPORT_INVALID_DESCR    (25 + LAST_STDERRNO)

#define ECAB_INVALID_ID        (26 + LAST_STDERRNO)
#define ECAB_CLOSED            (27 + LAST_STDERRNO)
#define ECAB_INVALID_MSG_NUM   (28 + LAST_STDERRNO)
#define ECAB_NO_MORE_ENTRY     (29 + LAST_STDERRNO)
#define ECAB_TOO_MUCH_MSG      (30 + LAST_STDERRNO)


#endif