From caab339b6c19f12103d1c0ddeaa55b449318d98c Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 23 Jul 2013 11:03:13 +0200 Subject: rtems: Create options implementation header Move implementation specific parts of options.h and options.inl into new header file optionsimpl.h. The options.h contains now only the application visible API. --- cpukit/rtems/include/rtems/rtems/options.h | 8 ++- cpukit/rtems/include/rtems/rtems/optionsimpl.h | 67 ++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 cpukit/rtems/include/rtems/rtems/optionsimpl.h (limited to 'cpukit/rtems/include/rtems') diff --git a/cpukit/rtems/include/rtems/rtems/options.h b/cpukit/rtems/include/rtems/rtems/options.h index 29c0351a34..9f9eb3b110 100644 --- a/cpukit/rtems/include/rtems/rtems/options.h +++ b/cpukit/rtems/include/rtems/rtems/options.h @@ -21,6 +21,8 @@ #ifndef _RTEMS_RTEMS_OPTIONS_H #define _RTEMS_RTEMS_OPTIONS_H +#include + #ifdef __cplusplus extern "C" { #endif @@ -71,15 +73,11 @@ typedef uint32_t rtems_option; */ #define RTEMS_EVENT_ANY 0x00000002 -#ifndef __RTEMS_APPLICATION__ -#include -#endif +/**@}*/ #ifdef __cplusplus } #endif -/**@}*/ - #endif /* end of include file */ diff --git a/cpukit/rtems/include/rtems/rtems/optionsimpl.h b/cpukit/rtems/include/rtems/rtems/optionsimpl.h new file mode 100644 index 0000000000..e27462f82d --- /dev/null +++ b/cpukit/rtems/include/rtems/rtems/optionsimpl.h @@ -0,0 +1,67 @@ +/** + * @file + * + * @ingroup ClassicOptionsImpl + * + * @brief Classic Options Implementation + */ + +/* 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. + */ + +#ifndef _RTEMS_RTEMS_OPTIONSIMPL_H +#define _RTEMS_RTEMS_OPTIONSIMPL_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup ClassicOptionsImpl Classic Options Implementation + * + * @ingroup ClassicOptions + * + * @{ + */ + +/** + * @brief Checks if the RTEMS_NO_WAIT option is enabled in option_set. + * + * This function returns TRUE if the RTEMS_NO_WAIT option is enabled in + * option_set, and FALSE otherwise. + */ +RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( + rtems_option option_set +) +{ + return (option_set & RTEMS_NO_WAIT) ? true : false; +} + +/** + * @brief Checks if the RTEMS_EVENT_ANY option is enabled in OPTION_SET. + * + * This function returns TRUE if the RTEMS_EVENT_ANY option is enabled in + * OPTION_SET, and FALSE otherwise. + */ +RTEMS_INLINE_ROUTINE bool _Options_Is_any ( + rtems_option option_set +) +{ + return (option_set & RTEMS_EVENT_ANY) ? true : false; +} + +/**@}*/ + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ -- cgit v1.2.3