mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
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.
This commit is contained in:
@@ -17,10 +17,8 @@
|
|||||||
|
|
||||||
#include <rtems/score/basedefs.h>
|
#include <rtems/score/basedefs.h>
|
||||||
|
|
||||||
#if defined(RTEMS_POSIX_API)
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -51,13 +49,8 @@ typedef enum {
|
|||||||
/**
|
/**
|
||||||
* @brief Macro to build a status code from Classic and POSIX API parts.
|
* @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 ) \
|
||||||
#define STATUS_BUILD( classic_status, posix_status ) \
|
|
||||||
( ( ( (unsigned int) ( posix_status ) ) << 8 ) | ( classic_status ) )
|
( ( ( (unsigned int) ( posix_status ) ) << 8 ) | ( classic_status ) )
|
||||||
#else
|
|
||||||
#define STATUS_BUILD( classic_status, posix_status ) \
|
|
||||||
( classic_status )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Macro to get the Classic API status code.
|
* @brief Macro to get the Classic API status code.
|
||||||
|
|||||||
Reference in New Issue
Block a user