[rtems commit] score: Make status codes unconditional

Sebastian Huber sebh at rtems.org
Thu Oct 5 07:46:04 UTC 2017


Module:    rtems
Branch:    master
Commit:    5cf5d46ec864d99be72c99f3a6eed970a34548b7
Changeset: http://git.rtems.org/rtems/commit/?id=5cf5d46ec864d99be72c99f3a6eed970a34548b7

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Oct  5 09:44:01 2017 +0200

score: Make status codes unconditional

The internal status codes encode a Classic rtems_status_code and error
codes used by the POSIX and C11/C++11 APIs.  In case the POSIX API is
disabled, the C11/C++11 support must still work.

Close #3167.

---

 cpukit/score/include/rtems/score/status.h | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/cpukit/score/include/rtems/score/status.h b/cpukit/score/include/rtems/score/status.h
index 2695a03..5b154bb 100644
--- a/cpukit/score/include/rtems/score/status.h
+++ b/cpukit/score/include/rtems/score/status.h
@@ -17,10 +17,8 @@
 
 #include <rtems/score/basedefs.h>
 
-#if defined(RTEMS_POSIX_API)
 #include <errno.h>
 #include <pthread.h>
-#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -51,13 +49,8 @@ typedef enum {
 /**
  * @brief Macro to build a status code from Classic and POSIX API parts.
  */
-#if defined(RTEMS_POSIX_API)
-  #define STATUS_BUILD( classic_status, posix_status ) \
-    ( ( ( (unsigned int) ( posix_status ) ) << 8 ) | ( classic_status ) )
-#else
-  #define STATUS_BUILD( classic_status, posix_status ) \
-    ( classic_status )
-#endif
+#define STATUS_BUILD( classic_status, posix_status ) \
+  ( ( ( (unsigned int) ( posix_status ) ) << 8 ) | ( classic_status ) )
 
 /**
  * @brief Macro to get the Classic API status code.




More information about the vc mailing list