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

Last change on this file since 0c6c31b was 0c6c31b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:46:06

2003-09-04 Joel Sherrill <joel@…>

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