diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-12-14 09:41:56 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-02-09 07:06:49 +0100 |
commit | 286ff5868ee6499301f38d26434922b6f0409365 (patch) | |
tree | fffe5e0a2ea3684fa0607cabc9dd3b85e135adf5 /cpukit/include/rtems/score | |
parent | bsps/shared/ofw: Bug fixes (diff) | |
download | rtems-286ff5868ee6499301f38d26434922b6f0409365.tar.bz2 |
basedefs: Add stringification of argument lists
Change RTEMS_STRING() and RTEMS_XSTRING() to accept a variable number of
arguments which is stringified. This can be used for example to create
register lists for inline assembler statements.
Diffstat (limited to 'cpukit/include/rtems/score')
-rw-r--r-- | cpukit/include/rtems/score/basedefs.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cpukit/include/rtems/score/basedefs.h b/cpukit/include/rtems/score/basedefs.h index fe5f4ab7c7..c3a46f52b3 100644 --- a/cpukit/include/rtems/score/basedefs.h +++ b/cpukit/include/rtems/score/basedefs.h @@ -339,13 +339,13 @@ extern "C" { /** * @ingroup RTEMSAPIBaseDefs * - * @brief Stringifies _x without expanding. + * @brief Stringifies the arguments without expanding them. * - * @param _x is the token to stringify. + * @param ... are the arguments to stringify. * - * @return Returns the stringification of the token _x. + * @return Returns the stringification of the arguments. */ -#define RTEMS_STRING( _x ) #_x +#define RTEMS_STRING( ... ) #__VA_ARGS__ /* Generated from spec:/rtems/basedefs/if/typeof-refx */ @@ -913,13 +913,13 @@ extern "C" { /** * @ingroup RTEMSAPIBaseDefs * - * @brief Stringifies the expansion of _x. + * @brief Stringifies the expansion of the arguments. * - * @param _x is the token expand and stringify. + * @param ... are the arguments to expand and stringify. * - * @return Returns the stringification of the expansion of token _x. + * @return Returns the stringification of the expansion of the arguments. */ -#define RTEMS_XSTRING( _x ) RTEMS_STRING( _x ) +#define RTEMS_XSTRING( ... ) RTEMS_STRING( __VA_ARGS__ ) /* Generated from spec:/rtems/basedefs/if/define-global-symbol */ |