diff options
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/libcsupport/src/resource_snapshot.c | 2 | ||||
-rw-r--r-- | cpukit/posix/Makefile.am | 2 | ||||
-rw-r--r-- | cpukit/posix/include/rtems/posix/rwlock.h | 48 | ||||
-rw-r--r-- | cpukit/posix/include/rtems/posix/rwlockimpl.h (renamed from cpukit/posix/inline/rtems/posix/rwlock.inl) | 54 | ||||
-rw-r--r-- | cpukit/posix/preinstall.am | 8 | ||||
-rw-r--r-- | cpukit/posix/src/prwlock.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlockdestroy.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlockinit.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlockrdlock.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlocktimedrdlock.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlocktimedwrlock.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlocktranslatereturncode.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlocktryrdlock.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlocktrywrlock.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlockunlock.c | 2 | ||||
-rw-r--r-- | cpukit/posix/src/prwlockwrlock.c | 2 | ||||
-rw-r--r-- | cpukit/sapi/src/posixapi.c | 2 |
17 files changed, 70 insertions, 68 deletions
diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c index d3f162ff05..6b875a8487 100644 --- a/cpukit/libcsupport/src/resource_snapshot.c +++ b/cpukit/libcsupport/src/resource_snapshot.c @@ -37,7 +37,7 @@ #include <rtems/posix/key.h> #include <rtems/posix/psignal.h> #include <rtems/posix/pthreadimpl.h> - #include <rtems/posix/rwlock.h> + #include <rtems/posix/rwlockimpl.h> #include <rtems/posix/semaphoreimpl.h> #include <rtems/posix/spinlock.h> #include <rtems/posix/timer.h> diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am index f378209ee7..6e69fdd6bd 100644 --- a/cpukit/posix/Makefile.am +++ b/cpukit/posix/Makefile.am @@ -49,11 +49,11 @@ include_rtems_posix_HEADERS += include/rtems/posix/timer.h include_rtems_posix_HEADERS += include/rtems/posix/barrier.h include_rtems_posix_HEADERS += include/rtems/posix/barrierimpl.h include_rtems_posix_HEADERS += include/rtems/posix/rwlock.h +include_rtems_posix_HEADERS += include/rtems/posix/rwlockimpl.h include_rtems_posix_HEADERS += include/rtems/posix/spinlock.h include_rtems_posix_HEADERS += inline/rtems/posix/key.inl include_rtems_posix_HEADERS += inline/rtems/posix/timer.inl -include_rtems_posix_HEADERS += inline/rtems/posix/rwlock.inl include_rtems_posix_HEADERS += inline/rtems/posix/spinlock.inl ## src diff --git a/cpukit/posix/include/rtems/posix/rwlock.h b/cpukit/posix/include/rtems/posix/rwlock.h index 0cfd20dad8..31f75c2d58 100644 --- a/cpukit/posix/include/rtems/posix/rwlock.h +++ b/cpukit/posix/include/rtems/posix/rwlock.h @@ -25,6 +25,9 @@ #ifndef _RTEMS_POSIX_RWLOCK_H #define _RTEMS_POSIX_RWLOCK_H +#include <rtems/score/object.h> +#include <rtems/score/corerwlock.h> + #ifdef __cplusplus extern "C" { #endif @@ -39,9 +42,6 @@ extern "C" { */ /**@{**/ -#include <rtems/score/object.h> -#include <rtems/score/corerwlock.h> - /** * This type defines the control block used to manage each RWLock. */ @@ -53,48 +53,6 @@ typedef struct { CORE_RWLock_Control RWLock; } POSIX_RWLock_Control; -/** - * The following defines the information control block used to manage - * this class of objects. - */ - -POSIX_EXTERN Objects_Information _POSIX_RWLock_Information; - -/** - * @brief POSIX RWLock manager initialization. - * - * This routine performs the initialization necessary for this manager. - */ - -void _POSIX_RWLock_Manager_initialization(void); - -/** - * @brief POSIX translate core RWLock return code. - * - * This routine translates SuperCore RWLock status codes into the - * corresponding POSIX ones. - * - * - * @param[in] the_RWLock_status is the SuperCore status. - * - * @return the corresponding POSIX status - * @retval 0 The status indicates that the operation completed successfully. - * @retval EINVAL The status indicates that the thread was blocked waiting for - * an operation to complete and the RWLock was deleted. - * @retval EBUSY This status indicates that the RWLock was not - * immediately available. - * @retval ETIMEDOUT This status indicates that the calling task was - * willing to block but the operation was unable to complete within - * the time allotted because the resource never became available. - */ -int _POSIX_RWLock_Translate_core_RWLock_return_code( - CORE_RWLock_Status the_RWLock_status -); - -#ifndef __RTEMS_APPLICATION__ -#include <rtems/posix/rwlock.inl> -#endif - /** @} */ #ifdef __cplusplus diff --git a/cpukit/posix/inline/rtems/posix/rwlock.inl b/cpukit/posix/include/rtems/posix/rwlockimpl.h index ac641c926b..5911a8fd41 100644 --- a/cpukit/posix/inline/rtems/posix/rwlock.inl +++ b/cpukit/posix/include/rtems/posix/rwlockimpl.h @@ -16,15 +16,55 @@ * http://www.rtems.com/license/LICENSE. */ -#ifndef _RTEMS_POSIX_RWLOCK_H -# error "Never use <rtems/posix/rwlock.inl> directly; include <rtems/posix/rwlock.h> instead." -#endif +#ifndef _RTEMS_POSIX_RWLOCKIMPL_H +#define _RTEMS_POSIX_RWLOCKIMPL_H -#ifndef _RTEMS_POSIX_RWLOCK_INL -#define _RTEMS_POSIX_RWLOCK_INL +#include <rtems/posix/rwlock.h> #include <pthread.h> +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The following defines the information control block used to manage + * this class of objects. + */ + +POSIX_EXTERN Objects_Information _POSIX_RWLock_Information; + +/** + * @brief POSIX RWLock manager initialization. + * + * This routine performs the initialization necessary for this manager. + */ + +void _POSIX_RWLock_Manager_initialization(void); + +/** + * @brief POSIX translate core RWLock return code. + * + * This routine translates SuperCore RWLock status codes into the + * corresponding POSIX ones. + * + * + * @param[in] the_RWLock_status is the SuperCore status. + * + * @return the corresponding POSIX status + * @retval 0 The status indicates that the operation completed successfully. + * @retval EINVAL The status indicates that the thread was blocked waiting for + * an operation to complete and the RWLock was deleted. + * @retval EBUSY This status indicates that the RWLock was not + * immediately available. + * @retval ETIMEDOUT This status indicates that the calling task was + * willing to block but the operation was unable to complete within + * the time allotted because the resource never became available. + */ +int _POSIX_RWLock_Translate_core_RWLock_return_code( + CORE_RWLock_Status the_RWLock_status +); + /** * @brief Allocate a RWLock control block. * @@ -92,5 +132,9 @@ RTEMS_INLINE_ROUTINE bool _POSIX_RWLock_Is_null ( return ( the_RWLock == NULL ); } +#ifdef __cplusplus +} +#endif + #endif /* end of include file */ diff --git a/cpukit/posix/preinstall.am b/cpukit/posix/preinstall.am index 2cb926193e..07e987aac2 100644 --- a/cpukit/posix/preinstall.am +++ b/cpukit/posix/preinstall.am @@ -140,6 +140,10 @@ $(PROJECT_INCLUDE)/rtems/posix/rwlock.h: include/rtems/posix/rwlock.h $(PROJECT_ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/rwlock.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/rwlock.h +$(PROJECT_INCLUDE)/rtems/posix/rwlockimpl.h: include/rtems/posix/rwlockimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/rwlockimpl.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/rwlockimpl.h + $(PROJECT_INCLUDE)/rtems/posix/spinlock.h: include/rtems/posix/spinlock.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/spinlock.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/spinlock.h @@ -152,10 +156,6 @@ $(PROJECT_INCLUDE)/rtems/posix/timer.inl: inline/rtems/posix/timer.inl $(PROJECT $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/timer.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/timer.inl -$(PROJECT_INCLUDE)/rtems/posix/rwlock.inl: inline/rtems/posix/rwlock.inl $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/rwlock.inl -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/rwlock.inl - $(PROJECT_INCLUDE)/rtems/posix/spinlock.inl: inline/rtems/posix/spinlock.inl $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/spinlock.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/spinlock.inl diff --git a/cpukit/posix/src/prwlock.c b/cpukit/posix/src/prwlock.c index 1e803cb5ef..c27ca94ce4 100644 --- a/cpukit/posix/src/prwlock.c +++ b/cpukit/posix/src/prwlock.c @@ -17,7 +17,7 @@ #include <rtems/system.h> #include <rtems/config.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /** * @brief _POSIX_RWLock_Manager_initialization diff --git a/cpukit/posix/src/prwlockdestroy.c b/cpukit/posix/src/prwlockdestroy.c index 329a297f08..a55e985df7 100644 --- a/cpukit/posix/src/prwlockdestroy.c +++ b/cpukit/posix/src/prwlockdestroy.c @@ -21,7 +21,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /** * This directive allows a thread to delete a rwlock specified by diff --git a/cpukit/posix/src/prwlockinit.c b/cpukit/posix/src/prwlockinit.c index 0ee53e84d5..a438e5f15a 100644 --- a/cpukit/posix/src/prwlockinit.c +++ b/cpukit/posix/src/prwlockinit.c @@ -24,7 +24,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /* * pthread_rwlock_init diff --git a/cpukit/posix/src/prwlockrdlock.c b/cpukit/posix/src/prwlockrdlock.c index 621a7f84a4..3d4d76fab7 100644 --- a/cpukit/posix/src/prwlockrdlock.c +++ b/cpukit/posix/src/prwlockrdlock.c @@ -22,7 +22,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /** * This directive attempts to obtain a read only lock on an rwlock instance. diff --git a/cpukit/posix/src/prwlocktimedrdlock.c b/cpukit/posix/src/prwlocktimedrdlock.c index 732ba2a129..29e1c1b4f9 100644 --- a/cpukit/posix/src/prwlocktimedrdlock.c +++ b/cpukit/posix/src/prwlocktimedrdlock.c @@ -22,7 +22,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> #include <rtems/posix/time.h> /* diff --git a/cpukit/posix/src/prwlocktimedwrlock.c b/cpukit/posix/src/prwlocktimedwrlock.c index bd6232a49a..7a4d76071e 100644 --- a/cpukit/posix/src/prwlocktimedwrlock.c +++ b/cpukit/posix/src/prwlocktimedwrlock.c @@ -24,7 +24,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> #include <rtems/posix/time.h> /* diff --git a/cpukit/posix/src/prwlocktranslatereturncode.c b/cpukit/posix/src/prwlocktranslatereturncode.c index 48be176d36..72baee340a 100644 --- a/cpukit/posix/src/prwlocktranslatereturncode.c +++ b/cpukit/posix/src/prwlocktranslatereturncode.c @@ -22,7 +22,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> static int _POSIX_RWLock_Return_codes[CORE_RWLOCK_STATUS_LAST + 1] = { 0, /* CORE_RWLOCK_SUCCESSFUL */ diff --git a/cpukit/posix/src/prwlocktryrdlock.c b/cpukit/posix/src/prwlocktryrdlock.c index c6e2875bb5..c4cfd76108 100644 --- a/cpukit/posix/src/prwlocktryrdlock.c +++ b/cpukit/posix/src/prwlocktryrdlock.c @@ -22,7 +22,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /* * pthread_rwlock_tryrdlock diff --git a/cpukit/posix/src/prwlocktrywrlock.c b/cpukit/posix/src/prwlocktrywrlock.c index 26eb3e16bd..23259db34a 100644 --- a/cpukit/posix/src/prwlocktrywrlock.c +++ b/cpukit/posix/src/prwlocktrywrlock.c @@ -22,7 +22,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /* * pthread_rwlock_trywrlock diff --git a/cpukit/posix/src/prwlockunlock.c b/cpukit/posix/src/prwlockunlock.c index 67fca021cf..13fc6dcc57 100644 --- a/cpukit/posix/src/prwlockunlock.c +++ b/cpukit/posix/src/prwlockunlock.c @@ -24,7 +24,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /* * pthread_rwlock_unlock diff --git a/cpukit/posix/src/prwlockwrlock.c b/cpukit/posix/src/prwlockwrlock.c index 8643be1f4d..b53a7e0a61 100644 --- a/cpukit/posix/src/prwlockwrlock.c +++ b/cpukit/posix/src/prwlockwrlock.c @@ -24,7 +24,7 @@ #include <errno.h> #include <rtems/system.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> /* * pthread_rwlock_wrlock diff --git a/cpukit/sapi/src/posixapi.c b/cpukit/sapi/src/posixapi.c index ba003b6ca7..b460406ce2 100644 --- a/cpukit/sapi/src/posixapi.c +++ b/cpukit/sapi/src/posixapi.c @@ -38,7 +38,7 @@ #include <rtems/posix/priorityimpl.h> #include <rtems/posix/psignalimpl.h> #include <rtems/posix/pthreadimpl.h> -#include <rtems/posix/rwlock.h> +#include <rtems/posix/rwlockimpl.h> #include <rtems/posix/timer.h> #include <rtems/posix/semaphoreimpl.h> #include <rtems/posix/spinlock.h> |