From 9108bef646d4ba91c820cf7d5ffda6e5853f1093 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 23 Jul 2013 11:38:12 +0200 Subject: rtems: Merge support API into one file --- cpukit/rtems/Makefile.am | 1 - cpukit/rtems/include/rtems/rtems/support.h | 38 ++++++++++++++---- cpukit/rtems/inline/rtems/rtems/support.inl | 60 ----------------------------- cpukit/rtems/preinstall.am | 4 -- 4 files changed, 30 insertions(+), 73 deletions(-) delete mode 100644 cpukit/rtems/inline/rtems/rtems/support.inl diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am index 07fdfa2b9b..c28c82f944 100644 --- a/cpukit/rtems/Makefile.am +++ b/cpukit/rtems/Makefile.am @@ -71,7 +71,6 @@ include_rtems_rtems_HEADERS += inline/rtems/rtems/eventset.inl include_rtems_rtems_HEADERS += inline/rtems/rtems/part.inl include_rtems_rtems_HEADERS += inline/rtems/rtems/ratemon.inl include_rtems_rtems_HEADERS += inline/rtems/rtems/region.inl -include_rtems_rtems_HEADERS += inline/rtems/rtems/support.inl include_rtems_rtems_HEADERS += inline/rtems/rtems/tasks.inl include_rtems_rtems_HEADERS += inline/rtems/rtems/timer.inl diff --git a/cpukit/rtems/include/rtems/rtems/support.h b/cpukit/rtems/include/rtems/rtems/support.h index 335b8c02fa..e2e01b0b15 100644 --- a/cpukit/rtems/include/rtems/rtems/support.h +++ b/cpukit/rtems/include/rtems/rtems/support.h @@ -18,12 +18,12 @@ #ifndef _RTEMS_RTEMS_SUPPORT_H #define _RTEMS_RTEMS_SUPPORT_H +#include + #ifdef __cplusplus extern "C" { #endif -#include - /** * @addtogroup ClassicRTEMS */ @@ -48,6 +48,34 @@ extern "C" { #define RTEMS_MICROSECONDS_TO_TICKS(_us) \ ((_us) / rtems_configuration_get_microseconds_per_tick()) +/** + * @brief Returns @c true if the name is valid, and @c false otherwise. + */ +RTEMS_INLINE_ROUTINE bool rtems_is_name_valid ( + rtems_name name +) +{ + return ( name != 0 ); +} + +/** + * @brief Breaks the object name into the four component characters @a c1, + * @a c2, @a c3, and @a c4. + */ +RTEMS_INLINE_ROUTINE void rtems_name_to_characters( + rtems_name name, + char *c1, + char *c2, + char *c3, + char *c4 +) +{ + *c1 = (char) ((name >> 24) & 0xff); + *c2 = (char) ((name >> 16) & 0xff); + *c3 = (char) ((name >> 8) & 0xff); + *c4 = (char) ( name & 0xff); +} + /** @} */ /** @@ -134,15 +162,9 @@ void rtems_workspace_greedy_free( void *opaque ); /** @} */ -#ifndef __RTEMS_APPLICATION__ -#include -#endif - #ifdef __cplusplus } #endif -/**@}*/ - #endif /* end of include file */ diff --git a/cpukit/rtems/inline/rtems/rtems/support.inl b/cpukit/rtems/inline/rtems/rtems/support.inl deleted file mode 100644 index a302c45c0b..0000000000 --- a/cpukit/rtems/inline/rtems/rtems/support.inl +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @file - * - * @ingroup ClassicRTEMS - * - * @brief Classic API support. - */ - -/* 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_SUPPORT_H -# error "Never use directly; include instead." -#endif - -#ifndef _RTEMS_RTEMS_SUPPORT_INL -#define _RTEMS_RTEMS_SUPPORT_INL - -/** - * @addtogroup ClassicRTEMS - */ -/**@{**/ - -/** - * @brief Returns @c true if the name is valid, and @c false otherwise. - */ -RTEMS_INLINE_ROUTINE bool rtems_is_name_valid ( - rtems_name name -) -{ - return ( name != 0 ); -} - -/** - * @brief Breaks the object name into the four component characters @a c1, - * @a c2, @a c3, and @a c4. - */ -RTEMS_INLINE_ROUTINE void rtems_name_to_characters( - rtems_name name, - char *c1, - char *c2, - char *c3, - char *c4 -) -{ - *c1 = (char) ((name >> 24) & 0xff); - *c2 = (char) ((name >> 16) & 0xff); - *c3 = (char) ((name >> 8) & 0xff); - *c4 = (char) ( name & 0xff); -} - -/** @} */ - -#endif -/* end of include file */ diff --git a/cpukit/rtems/preinstall.am b/cpukit/rtems/preinstall.am index cf823b0e3f..e853e92d38 100644 --- a/cpukit/rtems/preinstall.am +++ b/cpukit/rtems/preinstall.am @@ -229,10 +229,6 @@ $(PROJECT_INCLUDE)/rtems/rtems/region.inl: inline/rtems/rtems/region.inl $(PROJE $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/region.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/region.inl -$(PROJECT_INCLUDE)/rtems/rtems/support.inl: inline/rtems/rtems/support.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/support.inl -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/support.inl - $(PROJECT_INCLUDE)/rtems/rtems/tasks.inl: inline/rtems/rtems/tasks.inl $(PROJECT_INCLUDE)/rtems/rtems/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/rtems/tasks.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/rtems/tasks.inl -- cgit v1.2.3