From 3d35bc00d8483a748c819012c860550271c37b9a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 11 Jan 2017 13:41:55 +0100 Subject: score: Improve SMP lock debug support The CPU index starts with zero. Increment it by one, to allow global SMP locks to reside in the BSS section. --- cpukit/score/src/smplock.c | 2 +- cpukit/score/src/threadq.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src') diff --git a/cpukit/score/src/smplock.c b/cpukit/score/src/smplock.c index e921837455..b9c7f6eed6 100644 --- a/cpukit/score/src/smplock.c +++ b/cpukit/score/src/smplock.c @@ -72,6 +72,6 @@ void _SMP_lock_Release_and_ISR_enable( #if defined(RTEMS_DEBUG) bool _SMP_lock_Is_owner( const SMP_lock_Control *lock ) { - return lock->owner == _SMP_Get_current_processor(); + return lock->owner == _SMP_lock_Who_am_I(); } #endif diff --git a/cpukit/score/src/threadq.c b/cpukit/score/src/threadq.c index d427431adb..b12e3deb49 100644 --- a/cpukit/score/src/threadq.c +++ b/cpukit/score/src/threadq.c @@ -76,7 +76,7 @@ void _Thread_queue_Do_acquire_critical( lock_context ); #if defined(RTEMS_DEBUG) - the_thread_queue->owner = _SMP_Get_current_processor(); + the_thread_queue->owner = _SMP_lock_Who_am_I(); #endif } @@ -92,7 +92,7 @@ void _Thread_queue_Acquire( &queue_context->Lock_context.Lock_context ); #if defined(RTEMS_DEBUG) - the_thread_queue->owner = _SMP_Get_current_processor(); + the_thread_queue->owner = _SMP_lock_Who_am_I(); #endif } -- cgit v1.2.3