OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [c/] [src/] [librtems++/] [src/] [rtemsStatusCode.cc] - Rev 1026

Go to most recent revision | Compare with Previous | Blame | View Log

/*
  ------------------------------------------------------------------------
  rtemsStatusCode.cc,v 1.1 1997/07/31 22:13:26 joel Exp
  ------------------------------------------------------------------------
 
  COPYRIGHT (c) 1997
  Objective Design Systems Ltd Pty (ODS)
  All rights reserved (R) Objective Design Systems Ltd Pty
 
  The license and distribution terms for this file may be found in the
  file LICENSE in this distribution or at
  http://www.OARcorp.com/rtems/license.html.
 
  ------------------------------------------------------------------------
 
  See header file.
 
  ------------------------------------------------------------------------
*/
 
#include <rtems++/rtemsStatusCode.h>
 
/* ----
    Status Code string table
*/
 
static char *status_strings[RTEMS_STATUS_CODES_LAST + 1] =
{
  "RTEMS[00] successful completion",
  "RTEMS[01] task exitted, returned from a thread",
  "RTEMS[02] multiprocessing not configured",
  "RTEMS[03] invalid object name",
  "RTEMS[04] invalid object id",
  "RTEMS[05] too many",
  "RTEMS[06] timed out waiting",
  "RTEMS[07] object deleted while waiting",
  "RTEMS[08] specified size was invalid",
  "RTEMS[09] address specified is invalid",
  "RTEMS[10] number was invalid",
  "RTEMS[11] item has not been initialized",
  "RTEMS[12] resources still outstanding",
  "RTEMS[13] request not satisfied",
  "RTEMS[14] thread is in wrong state",
  "RTEMS[15] thread already in state",
  "RTEMS[16] illegal on calling thread",
  "RTEMS[17] illegal for remote object",
  "RTEMS[18] called from wrong environment",
  "RTEMS[19] invalid thread priority",
  "RTEMS[20] invalid date/time",
  "RTEMS[21] invalid node id",
  "RTEMS[22] directive not configured",
  "RTEMS[23] not owner of resource",
  "RTEMS[24] directive not implemented",
  "RTEMS[25] RTEMS inconsistency detected",
  "RTEMS[26] could not get enough memory"
};
 
/* ----
    StatusCode
*/
 
const char *rtemsStatusCode::last_status_string()
{
  return status_string(last_status);
}
 
const char *rtemsStatusCode::status_string(rtems_status_code status_code)
{
  // mapped from "rtems/rtems/status.h"
  if (status_code <= RTEMS_STATUS_CODES_LAST)
  {
    return status_strings[status_code];
  }
 
  return "unknown status code";
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.