diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-19 15:18:08 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-22 16:57:24 +0200 |
commit | eb448eece9305b2bba641471a428af4dad97effc (patch) | |
tree | a91945c92a3676581af54b186a588bfab8894a4c /cpukit/posix/inline/rtems/posix/spinlock.inl | |
parent | posix: Create timer implementation header (diff) | |
download | rtems-eb448eece9305b2bba641471a428af4dad97effc.tar.bz2 |
posix: Create spinlock implementation header
Move implementation specific parts of spinlock.h and spinlock.inl into
new header file spinlockimpl.h. The spinlock.h contains now only the
application visible API.
Diffstat (limited to '')
-rw-r--r-- | cpukit/posix/include/rtems/posix/spinlockimpl.h (renamed from cpukit/posix/inline/rtems/posix/spinlock.inl) | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/cpukit/posix/inline/rtems/posix/spinlock.inl b/cpukit/posix/include/rtems/posix/spinlockimpl.h index b8ababda02..5853d45c82 100644 --- a/cpukit/posix/inline/rtems/posix/spinlock.inl +++ b/cpukit/posix/include/rtems/posix/spinlockimpl.h @@ -16,15 +16,46 @@ * http://www.rtems.com/license/LICENSE. */ -#ifndef _RTEMS_POSIX_SPINLOCK_H -# error "Never use <rtems/posix/spinlock.inl> directly; include <rtems/posix/spinlock.h> instead." -#endif +#ifndef _RTEMS_POSIX_SPINLOCKIMPL_H +#define _RTEMS_POSIX_SPINLOCKIMPL_H -#ifndef _RTEMS_POSIX_SPINLOCK_INL -#define _RTEMS_POSIX_SPINLOCK_INL +#include <rtems/posix/spinlock.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_Spinlock_Information; + +/** + * @brief POSIX spinlock manager initialization. + * + * This routine performs the initialization necessary for this manager. + */ + +void _POSIX_Spinlock_Manager_initialization(void); + +/** + * @brief Translate core spinlock status code. + * + * This routine translates SuperCore Spinlock status codes into the + * corresponding POSIX ones. + * + * @param[in] the_spinlock_status is the SuperCore status. + * + * @return the corresponding POSIX status + */ +int _POSIX_Spinlock_Translate_core_spinlock_return_code( + CORE_spinlock_Status the_spinlock_status +); + /** * @brief Allocate a spinlock control block. * @@ -92,5 +123,9 @@ RTEMS_INLINE_ROUTINE bool _POSIX_Spinlock_Is_null ( return ( the_spinlock == NULL ); } +#ifdef __cplusplus +} +#endif + #endif /* end of include file */ |