gonzui


Format: Advanced Search

tkernel_2/include/tk/errno.hbare sourcepermlink (0.02 seconds)

Search this content:

    1: /*
    2:  *----------------------------------------------------------------------
    3:  *    T-Kernel 2.0 Software Package
    4:  *
    5:  *    Copyright 2011 by Ken Sakamura.
    6:  *    This software is distributed under the latest version of T-License 2.x.
    7:  *----------------------------------------------------------------------
    8:  *
    9:  *    Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17.
   10:  *    Modified by TRON Forum(http://www.tron.org/) at 2015/06/01.
   11:  *
   12:  *----------------------------------------------------------------------
   13:  */
   14: 
   15: /*
   16:  *      @(#)errno.h (T-Kernel)
   17:  *
   18:  *      T-Kernel Error Code
   19:  */
   20: 
   21: #ifndef __TK_ERRNO_H__
   22: #define __TK_ERRNO_H__
   23: 
   24: #ifndef _in_asm_source_
   25: #include <tk/typedef.h>
   26: 
   27: #define MERCD(er)       ( (ER)(er) >> 16 )    /* Main error code */
   28: #define SERCD(er)       ( (H)(er) )           /* Sub-error code */
   29: #define ERCD(mer, ser)  ( (ER)(((UW)(mer) << 16) | ((UW)(ser) & 0x0000FFFF)) )
   30: #else
   31: #define ERCD(mer, ser)  ( ((mer) << 16) | ((ser) & 0xffff) )
   32: #endif /* _in_asm_source_ */
   33: 
   34: #define E_OK            0         /* Completed successfully */
   35: 
   36: #define E_SYS           ERCD(-5, 0)      /* System error */
   37: #define E_NOCOP         ERCD(-6, 0)    /* Coprocessor disable */
   38: #define E_NOSPT         ERCD(-9, 0)    /* Unsupported function */
   39: #define E_RSFN          ERCD(-10, 0)    /* Reserved function code number */
   40: #define E_RSATR         ERCD(-11, 0)   /* Reserved attribute */
   41: #define E_PAR           ERCD(-17, 0)     /* Parameter error */
   42: #define E_ID            ERCD(-18, 0)      /* Incorrect ID number */
   43: #define E_CTX           ERCD(-25, 0)     /* Context error */
   44: #define E_MACV          ERCD(-26, 0)    /* Inaccessible memory/access violation */
   45: #define E_OACV          ERCD(-27, 0)    /* Object access violation */
   46: #define E_ILUSE         ERCD(-28, 0)   /* Incorrect system call use */
   47: #define E_NOMEM         ERCD(-33, 0)   /* Insufficient memory */
   48: #define E_LIMIT         ERCD(-34, 0)   /* Exceed system limits */
   49: #define E_OBJ           ERCD(-41, 0)     /* Incorrect object state */
   50: #define E_NOEXS         ERCD(-42, 0)   /* Object does not exist */
   51: #define E_QOVR          ERCD(-43, 0)    /* Queuing overflow */
   52: #define E_RLWAI         ERCD(-49, 0)   /* Forcibly release wait state */
   53: #define E_TMOUT         ERCD(-50, 0)   /* Polling fail/time out */
   54: #define E_DLT           ERCD(-51, 0)     /* Waited object was deleted */
   55: #define E_DISWAI        ERCD(-52, 0)   /* Release wait caused by wait disable */
   56: 
   57: #define E_IO            ERCD(-57, 0)      /* Output/input error */
   58: #define E_NOMDA         ERCD(-58, 0)   /* No media */
   59: #define E_BUSY          ERCD(-65, 0)    /* Busy state */
   60: #define E_ABORT         ERCD(-66, 0)   /* Aborted */
   61: #define E_RONLY         ERCD(-67, 0)   /* write protected */
   62: 
   63: #endif /* __TK_ERRNO_H__ */