diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-25 07:45:47 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-25 07:45:47 +0000 |
commit | 95008c6dc4d1c4cdf63554512ed78b07142da969 (patch) | |
tree | 09282f98a224d5f9a3fc72c9c2e8de35a8366fd8 | |
parent | 2011-10-25 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-95008c6dc4d1c4cdf63554512ed78b07142da969.tar.bz2 |
2011-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* rtems/Makefile.am: Add src/status.c.
* rtems/include/rtems/rtems/status.h: Make
_Status_Object_name_errors_to_status an external variable.
* rtems/src/status.c: New (split out from
rtems/include/rtems/rtems/status.h).
-rw-r--r-- | cpukit/ChangeLog | 8 | ||||
-rw-r--r-- | cpukit/rtems/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/rtems/include/rtems/rtems/status.h | 17 | ||||
-rw-r--r-- | cpukit/rtems/src/status.c | 29 |
4 files changed, 40 insertions, 16 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 72305576ea..3068780384 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,13 @@ 2011-10-25 Ralf Corsépius <ralf.corsepius@rtems.org> + * rtems/Makefile.am: Add src/status.c. + * rtems/include/rtems/rtems/status.h: Make + _Status_Object_name_errors_to_status an external variable. + * rtems/src/status.c: New (split out from + rtems/include/rtems/rtems/status.h). + +2011-10-25 Ralf Corsépius <ralf.corsepius@rtems.org> + * rtems/Makefile.am: Reformat. 2011-10-24 Ralf Corsépius <ralf.corsepius@rtems.org> diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index fccc808e43..6dc67e03a1 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -257,6 +257,8 @@ librtems_a_SOURCES += src/workspace.c librtems_a_SOURCES += src/attr.c +librtems_a_SOURCES += src/status.c + if HAS_MP # We only build multiprocessing related files if HAS_MP was defined librtems_a_SOURCES += src/eventmp.c diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h index 0f42a8b54d..7aad661111 100644 --- a/cpukit/rtems/include/rtems/rtems/status.h +++ b/cpukit/rtems/include/rtems/rtems/status.h @@ -188,22 +188,7 @@ typedef enum { * This array is used to map SuperCore Object Handler return * codes to Classic API status codes. */ -#ifdef RTEMS_API_INIT -const rtems_status_code _Status_Object_name_errors_to_status[] = { - /** This maps OBJECTS_SUCCESSFUL to RTEMS_SUCCESSFUL. */ - RTEMS_SUCCESSFUL, - /** This maps OBJECTS_INVALID_NAME to RTEMS_INVALID_NAME. */ - RTEMS_INVALID_NAME, - /** This maps OBJECTS_INVALID_ADDRESS to RTEMS_INVALID_NAME. */ - RTEMS_INVALID_ADDRESS, - /** This maps OBJECTS_INVALID_ID to RTEMS_INVALID_ADDRESS. */ - RTEMS_INVALID_ID, - /** This maps OBJECTS_INVALID_NODE to RTEMS_INVALID_NODE. */ - RTEMS_INVALID_NODE -}; -#else -extern rtems_status_code _Status_Object_name_errors_to_status[]; -#endif +extern const rtems_status_code _Status_Object_name_errors_to_status[]; /* * Applications are allowed to use the macros to compare status codes. diff --git a/cpukit/rtems/src/status.c b/cpukit/rtems/src/status.c new file mode 100644 index 0000000000..4414d090a1 --- /dev/null +++ b/cpukit/rtems/src/status.c @@ -0,0 +1,29 @@ +/* COPYRIGHT (c) 1989-2008. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include <rtems/rtems/status.h> + +/** + * This array is used to map SuperCore Object Handler return + * codes to Classic API status codes. + */ + +const rtems_status_code _Status_Object_name_errors_to_status[] = { + /** This maps OBJECTS_SUCCESSFUL to RTEMS_SUCCESSFUL. */ + RTEMS_SUCCESSFUL, + /** This maps OBJECTS_INVALID_NAME to RTEMS_INVALID_NAME. */ + RTEMS_INVALID_NAME, + /** This maps OBJECTS_INVALID_ADDRESS to RTEMS_INVALID_NAME. */ + RTEMS_INVALID_ADDRESS, + /** This maps OBJECTS_INVALID_ID to RTEMS_INVALID_ADDRESS. */ + RTEMS_INVALID_ID, + /** This maps OBJECTS_INVALID_NODE to RTEMS_INVALID_NODE. */ + RTEMS_INVALID_NODE +}; |