diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-25 16:30:23 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-30 16:16:21 +0200 |
commit | af746b093a12871f7faec81c17f8b67fdd76799e (patch) | |
tree | 032b648c2be669815a51b2f3c59ca70e2ec396b1 /cpukit/score/include/rtems/score/mrspimpl.h | |
parent | score: _CORE_mutex_Check_dispatch_for_seize() (diff) | |
download | rtems-af746b093a12871f7faec81c17f8b67fdd76799e.tar.bz2 |
score: Use thread queue lock for MrsP
Replace the ISR lock in MRSP_Control with a thread queue. This
simplifies the Classic semaphore implementation. Only the lock part of
the thread queue is used.
Diffstat (limited to 'cpukit/score/include/rtems/score/mrspimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/mrspimpl.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h index 5a1fcda54d..cdeaff35c1 100644 --- a/cpukit/score/include/rtems/score/mrspimpl.h +++ b/cpukit/score/include/rtems/score/mrspimpl.h @@ -24,6 +24,7 @@ #include <rtems/score/resourceimpl.h> #include <rtems/score/schedulerimpl.h> #include <rtems/score/status.h> +#include <rtems/score/threadqimpl.h> #include <rtems/score/watchdogimpl.h> #include <rtems/score/wkspace.h> @@ -65,7 +66,10 @@ RTEMS_INLINE_ROUTINE void _MRSP_Acquire_critical( Thread_queue_Context *queue_context ) { - _ISR_lock_Acquire( &mrsp->Lock, &queue_context->Lock_context ); + _Thread_queue_Acquire_critical( + &mrsp->Wait_queue, + &queue_context->Lock_context + ); } RTEMS_INLINE_ROUTINE void _MRSP_Release( @@ -73,7 +77,7 @@ RTEMS_INLINE_ROUTINE void _MRSP_Release( Thread_queue_Context *queue_context ) { - _ISR_lock_Release_and_ISR_enable( &mrsp->Lock, &queue_context->Lock_context ); + _Thread_queue_Release( &mrsp->Wait_queue, &queue_context->Lock_context ); } RTEMS_INLINE_ROUTINE bool _MRSP_Restore_priority_filter( @@ -160,7 +164,7 @@ RTEMS_INLINE_ROUTINE Status_Control _MRSP_Initialize( _Resource_Initialize( &mrsp->Resource ); _Chain_Initialize_empty( &mrsp->Rivals ); - _ISR_lock_Initialize( &mrsp->Lock, "MrsP" ); + _Thread_queue_Initialize( &mrsp->Wait_queue ); return STATUS_SUCCESSFUL; } @@ -438,7 +442,7 @@ RTEMS_INLINE_ROUTINE void _MRSP_Destroy( ) { _MRSP_Release( mrsp, queue_context ); - _ISR_lock_Destroy( &mrsp->Lock ); + _Thread_queue_Destroy( &mrsp->Wait_queue ); _Workspace_Free( mrsp->ceiling_priorities ); } |