diff options
Diffstat (limited to 'cpukit/score/src/smplock.c')
-rw-r--r-- | cpukit/score/src/smplock.c | 43 |
1 files changed, 7 insertions, 36 deletions
diff --git a/cpukit/score/src/smplock.c b/cpukit/score/src/smplock.c index f6cc8b6d81..73fa67d74d 100644 --- a/cpukit/score/src/smplock.c +++ b/cpukit/score/src/smplock.c @@ -17,36 +17,28 @@ #endif #include <rtems/score/smplock.h> -#include <rtems/score/assert.h> -#include <rtems/score/smp.h> #if defined(RTEMS_SMP_LOCK_DO_NOT_INLINE) - void _SMP_lock_Initialize( SMP_lock_Control *lock, const char *name ) { - _SMP_lock_Initialize_body( lock, name ); + _SMP_lock_Initialize_inline( lock, name ); } void _SMP_lock_Destroy( SMP_lock_Control *lock ) { - _SMP_lock_Destroy_body( lock ); + _SMP_lock_Destroy_inline( lock ); } +#endif void _SMP_lock_Acquire( SMP_lock_Control *lock, SMP_lock_Context *context ) { -#if defined(RTEMS_DEBUG) - context->lock_used_for_acquire = lock; -#endif - _SMP_lock_Acquire_body( lock, context ); -#if defined(RTEMS_DEBUG) - lock->owner = _SMP_Get_current_processor(); -#endif + _SMP_lock_Acquire_inline( lock, context ); } void _SMP_lock_Release( @@ -54,13 +46,7 @@ void _SMP_lock_Release( SMP_lock_Context *context ) { -#if defined(RTEMS_DEBUG) - _Assert( context->lock_used_for_acquire == lock ); - context->lock_used_for_acquire = NULL; - _Assert( lock->owner == _SMP_Get_current_processor() ); - lock->owner = SMP_LOCK_NO_OWNER; -#endif - _SMP_lock_Release_body( lock, context ); + _SMP_lock_Release_inline( lock, context ); } void _SMP_lock_ISR_disable_and_acquire( @@ -68,13 +54,7 @@ void _SMP_lock_ISR_disable_and_acquire( SMP_lock_Context *context ) { -#if defined(RTEMS_DEBUG) - context->lock_used_for_acquire = lock; -#endif - _SMP_lock_ISR_disable_and_acquire_body( lock, context ); -#if defined(RTEMS_DEBUG) - lock->owner = _SMP_Get_current_processor(); -#endif + _SMP_lock_ISR_disable_and_acquire_inline( lock, context ); } void _SMP_lock_Release_and_ISR_enable( @@ -82,14 +62,7 @@ void _SMP_lock_Release_and_ISR_enable( SMP_lock_Context *context ) { -#if defined(RTEMS_DEBUG) - _Assert( context->lock_used_for_acquire == lock ); - context->lock_used_for_acquire = NULL; - _Assert( lock->owner == _SMP_Get_current_processor() ); - lock->owner = SMP_LOCK_NO_OWNER; -#endif - _SMP_lock_Release_body( lock, context ); - _ISR_Local_enable( context->isr_level ); + _SMP_lock_Release_and_ISR_enable_inline( lock, context ); } #if defined(RTEMS_DEBUG) @@ -98,5 +71,3 @@ bool _SMP_lock_Is_owner( const SMP_lock_Control *lock ) return lock->owner == _SMP_Get_current_processor(); } #endif - -#endif /* defined(RTEMS_SMP_LOCK_DO_NOT_INLINE) */ |