diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-18 06:53:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-21 07:29:38 +0200 |
commit | ca18cb593f11503802e581e1e257d02ceb4860d1 (patch) | |
tree | db52ab6e1235769d5521dc5ac36eec65b416a55e /cpukit/score/include/rtems/score/mrspimpl.h | |
parent | score: Fix _CORE_semaphore_Flush() (diff) | |
download | rtems-ca18cb593f11503802e581e1e257d02ceb4860d1.tar.bz2 |
score: Close semaphore object before flush
This prevents use of the object after the flush on uni-processor
configurations.
Diffstat (limited to 'cpukit/score/include/rtems/score/mrspimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/mrspimpl.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/mrspimpl.h b/cpukit/score/include/rtems/score/mrspimpl.h index 7638fb5975..1287ad1f50 100644 --- a/cpukit/score/include/rtems/score/mrspimpl.h +++ b/cpukit/score/include/rtems/score/mrspimpl.h @@ -398,16 +398,19 @@ RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Release( return MRSP_SUCCESSFUL; } -RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Destroy( MRSP_Control *mrsp ) +RTEMS_INLINE_ROUTINE MRSP_Status _MRSP_Can_destroy( MRSP_Control *mrsp ) { if ( _Resource_Get_owner( &mrsp->Resource ) != NULL ) { return MRSP_RESOUCE_IN_USE; } + return MRSP_SUCCESSFUL; +} + +RTEMS_INLINE_ROUTINE void _MRSP_Destroy( MRSP_Control *mrsp ) +{ _ISR_lock_Destroy( &mrsp->Lock ); _Workspace_Free( mrsp->ceiling_priorities ); - - return MRSP_SUCCESSFUL; } /** @} */ |