summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/corerwlockimpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/include/rtems/score/corerwlockimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/corerwlockimpl.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/cpukit/score/include/rtems/score/corerwlockimpl.h b/cpukit/score/include/rtems/score/corerwlockimpl.h
index 67084c136a..e80ab0ef0c 100644
--- a/cpukit/score/include/rtems/score/corerwlockimpl.h
+++ b/cpukit/score/include/rtems/score/corerwlockimpl.h
@@ -22,6 +22,7 @@
#include <rtems/score/corerwlock.h>
#include <rtems/score/thread.h>
#include <rtems/score/threadqimpl.h>
+#include <rtems/score/status.h>
#include <rtems/score/watchdog.h>
#ifdef __cplusplus
@@ -36,27 +37,6 @@ extern "C" {
#define CORE_RWLOCK_TQ_OPERATIONS &_Thread_queue_Operations_FIFO
/**
- * Core RWLock handler return statuses.
- */
-typedef enum {
- /** This status indicates that the operation completed successfully. */
- CORE_RWLOCK_SUCCESSFUL,
- /** This status indicates that the thread was blocked waiting for an */
- CORE_RWLOCK_WAS_DELETED,
- /** This status indicates that the rwlock was not immediately available. */
- CORE_RWLOCK_UNAVAILABLE,
- /** 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.
- */
- CORE_RWLOCK_TIMEOUT
-} CORE_RWLock_Status;
-
-/** This is the last status value.
- */
-#define CORE_RWLOCK_STATUS_LAST CORE_RWLOCK_TIMEOUT
-
-/**
* This is used to denote that a thread is blocking waiting for
* read-only access to the RWLock.
*/
@@ -117,11 +97,9 @@ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Release(
* @param[in] wait is true if the calling thread is willing to wait
* @param[in] timeout is the number of ticks the calling thread is willing
* to wait if @a wait is true.
- *
- * @note Status is returned via the thread control block.
*/
-void _CORE_RWLock_Seize_for_reading(
+Status_Control _CORE_RWLock_Seize_for_reading(
CORE_RWLock_Control *the_rwlock,
Thread_Control *executing,
bool wait,
@@ -138,10 +116,8 @@ void _CORE_RWLock_Seize_for_reading(
* @param[in] wait is true if the calling thread is willing to wait
* @param[in] timeout is the number of ticks the calling thread is willing
* to wait if @a wait is true.
- *
- * @note Status is returned via the thread control block.
*/
-void _CORE_RWLock_Seize_for_writing(
+Status_Control _CORE_RWLock_Seize_for_writing(
CORE_RWLock_Control *the_rwlock,
Thread_Control *executing,
bool wait,
@@ -159,7 +135,7 @@ void _CORE_RWLock_Seize_for_writing(
*
* @retval Status is returned to indicate successful or failure.
*/
-CORE_RWLock_Status _CORE_RWLock_Surrender(
+Status_Control _CORE_RWLock_Surrender(
CORE_RWLock_Control *the_rwlock,
Thread_queue_Context *queue_context
);