summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/inline/rtems/posix/rwlock.inl
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-19 14:39:45 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-22 16:57:23 +0200
commit0e8656b49eecdff64d639e765ef861cd974392e9 (patch)
tree02f825c7ef59c2d12dddd61a123fcd393b56fefa /cpukit/posix/inline/rtems/posix/rwlock.inl
parentposix: Create pthread implementation header (diff)
downloadrtems-0e8656b49eecdff64d639e765ef861cd974392e9.tar.bz2
posix: Create rwlock implementation header
Move implementation specific parts of rwlock.h and rwlock.inl into new header file rwlockimpl.h. The rwlock.h contains now only the application visible API.
Diffstat (limited to '')
-rw-r--r--cpukit/posix/include/rtems/posix/rwlockimpl.h (renamed from cpukit/posix/inline/rtems/posix/rwlock.inl)54
1 files changed, 49 insertions, 5 deletions
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 */