summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/status.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-23 10:54:37 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-23 15:12:52 +0200
commitfaa2f8c4e9145c629ad7670d0869c1caed33abc2 (patch)
tree27afeca6b33e3149b4c305e03e81a6a8746953d4 /cpukit/rtems/include/rtems/rtems/status.h
parentscore: Create rbtree implementation header (diff)
downloadrtems-faa2f8c4e9145c629ad7670d0869c1caed33abc2.tar.bz2
rtems: Create status implementation header
Move implementation specific parts of status.h and status.inl into new header file statusimpl.h. The status.h contains now only the application visible API.
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/status.h')
-rw-r--r--cpukit/rtems/include/rtems/rtems/status.h42
1 files changed, 29 insertions, 13 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/status.h b/cpukit/rtems/include/rtems/rtems/status.h
index 9732d290f0..4dad087435 100644
--- a/cpukit/rtems/include/rtems/rtems/status.h
+++ b/cpukit/rtems/include/rtems/rtems/status.h
@@ -21,6 +21,12 @@
#ifndef _RTEMS_RTEMS_STATUS_H
#define _RTEMS_RTEMS_STATUS_H
+#include <rtems/score/basedefs.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @defgroup ClassicStatus Status Codes
*
@@ -30,10 +36,6 @@
*/
/**@{*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/**
* @brief Classic API Status
*
@@ -188,23 +190,37 @@ typedef enum {
#define RTEMS_STATUS_CODES_LAST RTEMS_PROXY_BLOCKING
/**
- * @brief Status Object Name Errors to Status Array
+ * @brief Checks if the status code is equal to RTEMS_SUCCESSFUL.
*
- * This array is used to map SuperCore Object Handler return
- * codes to Classic API status codes.
+ * This function returns TRUE if the status code is equal to RTEMS_SUCCESSFUL,
+ * and FALSE otherwise.
*/
-extern const rtems_status_code _Status_Object_name_errors_to_status[];
+RTEMS_INLINE_ROUTINE bool rtems_is_status_successful(
+ rtems_status_code code
+)
+{
+ return (code == RTEMS_SUCCESSFUL);
+}
-/*
- * Applications are allowed to use the macros to compare status codes.
+/**
+ * @brief Checks if the status code1 is equal to code2.
+ *
+ * This function returns TRUE if the status code1 is equal to code2,
+ * and FALSE otherwise.
*/
-#include <rtems/rtems/status.inl>
+RTEMS_INLINE_ROUTINE bool rtems_are_statuses_equal(
+ rtems_status_code code1,
+ rtems_status_code code2
+)
+{
+ return (code1 == code2);
+}
+
+/**@}*/
#ifdef __cplusplus
}
#endif
-/**@}*/
-
#endif
/* end of include file */