err.h



 /*
 * err.h
 *     Public method declarations for error object
 *
 * ------------------------------------------------------------
 * A Kla2 Module
 * Copyright (c) 2003, David Clifton
 * All Rights Reserved
 * http://www.codelode.com
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice, website reference, this permission
 * notice, and the disclaimer of warranty below shall be included
 * in all copies, derivatives, or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 * -------------------------------------------------------------
 *
 */
#ifndef ERR_H
#define ERR_H
/*
 * Error codes
 */
typedef enum {
  /*
   * kla2 generated error codes
   */
    NO_ERROR=0,
    NO_MORE_PFCNS,
    BAD_PFCN_POSTED,
    BAD_INVOCATION_PRIORITY,
    BAD_PFCN_INDEX,
    CALLED_INVALID_PFCN,
    INTERRUPTS_NOT_DISABLED,

    INTERRUPTS_NOT_DISABLED2,
    TIMER_INTERRUPT_OVERRUN,
    OUT_OF_TIMED_PFCNS,
    NO_SUCH_PFCN,
    REMOVED_NONEXISTENT_TIMER,
    BAD_PIPE_POINTER,
    NO_MORE_PIPES,
    NEED_ATLEAST_ONE_PIPEBUF,
    NO_PIPE_BUFFER_SPACE,
    PIPE_ALLOC_ERROR,
    
    BAD_PIPE_BUFSIZE,
    NO_MORE_PIPE_BUFNODES,
    PIPE_READ_ERROR,
    PIPE_NOT_READ,
    PIPE_BUFFER_NOT_ALLOCD,
    ZERO_OR_NEG_PIPE_BUFFERS,
    PIPE_BOUNDARY_ERROR,
    PIPE_PTR_ERROR,
    BNODE_NOT_IN_ALLOCD_LIST,
    BNODE_NOT_IN_RECVD_LIST,
  /*
   * Main program error codes
   */
    IDLE_STATE_ERROR,
    SHOULDNT_GET_HERE,
    MAXIMUM_ERROR_CODE
} ERRNUM;

/*
 * Public method definitions
 */
void Err_init(void);
void Err_shutdown(ERRNUM);
#endif