source: rtems/c/src/librtems++/src/rtemsStatusCode.cc @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2  ------------------------------------------------------------------------
3
4  COPYRIGHT (c) 1997
5  Objective Design Systems Ltd Pty (ODS)
6  All rights reserved (R) Objective Design Systems Ltd Pty
7 
8  The license and distribution terms for this file may be found in the
9  file LICENSE in this distribution or at
10  http://www.rtems.org/license/LICENSE.
11
12  ------------------------------------------------------------------------
13
14  See header file.
15
16  ------------------------------------------------------------------------
17*/
18
19#include <rtems++/rtemsStatusCode.h>
20
21/* ----
22    Status Code string table
23*/
24
25static const char *status_strings[RTEMS_STATUS_CODES_LAST + 1] =
26{
27  "RTEMS[00] successful completion",
28  "RTEMS[01] task exitted, returned from a thread",
29  "RTEMS[02] multiprocessing not configured",
30  "RTEMS[03] invalid object name",
31  "RTEMS[04] invalid object id",
32  "RTEMS[05] too many",
33  "RTEMS[06] timed out waiting",
34  "RTEMS[07] object deleted while waiting",
35  "RTEMS[08] specified size was invalid",
36  "RTEMS[09] address specified is invalid",
37  "RTEMS[10] number was invalid",
38  "RTEMS[11] item has not been initialized",
39  "RTEMS[12] resources still outstanding",
40  "RTEMS[13] request not satisfied",
41  "RTEMS[14] thread is in wrong state",
42  "RTEMS[15] thread already in state",
43  "RTEMS[16] illegal on calling thread",
44  "RTEMS[17] illegal for remote object",
45  "RTEMS[18] called from wrong environment",
46  "RTEMS[19] invalid thread priority",
47  "RTEMS[20] invalid date/time",
48  "RTEMS[21] invalid node id",
49  "RTEMS[22] directive not configured",
50  "RTEMS[23] not owner of resource",
51  "RTEMS[24] directive not implemented",
52  "RTEMS[25] RTEMS inconsistency detected",
53  "RTEMS[26] could not get enough memory"
54};
55
56/* ----
57    StatusCode
58*/
59
60const char *rtemsStatusCode::last_status_string()
61{
62  return status_string(last_status);
63}
64
65const char *rtemsStatusCode::status_string(rtems_status_code status_code)
66{
67  // mapped from "rtems/rtems/status.h"
68  if (status_code <= RTEMS_STATUS_CODES_LAST)
69  {
70    return status_strings[status_code];
71  }
72
73  return "unknown status code";
74}
75
Note: See TracBrowser for help on using the repository browser.