From 0dd49d001515897cceb9195eb97dfac683552a0b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 31 Oct 2016 16:10:32 +0100 Subject: score: Introduce thread resource count methods This makes it easier to conditionally enable/disable the thread resource count usage. --- cpukit/score/include/rtems/score/coremuteximpl.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cpukit/score/include/rtems/score/coremuteximpl.h') diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h index bbe2f07a7e..31d2a6e71b 100644 --- a/cpukit/score/include/rtems/score/coremuteximpl.h +++ b/cpukit/score/include/rtems/score/coremuteximpl.h @@ -149,7 +149,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_recursive_mutex_Seize( if ( owner == NULL ) { _CORE_mutex_Set_owner( &the_mutex->Mutex, executing ); - ++executing->resource_count; + _Thread_Resource_count_increment( executing ); _CORE_mutex_Release( &the_mutex->Mutex, queue_context ); return STATUS_SUCCESSFUL; } @@ -196,7 +196,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_recursive_mutex_Surrender( return STATUS_SUCCESSFUL; } - --executing->resource_count; + _Thread_Resource_count_decrement( executing ); _CORE_mutex_Set_owner( &the_mutex->Mutex, NULL ); heads = the_mutex->Mutex.Wait_queue.Queue.heads; @@ -298,7 +298,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Set_owner( } _CORE_mutex_Set_owner( &the_mutex->Recursive.Mutex, owner ); - ++owner->resource_count; + _Thread_Resource_count_increment( owner ); _Thread_Priority_add( owner, &the_mutex->Priority_ceiling, @@ -390,7 +390,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Surrender( return STATUS_SUCCESSFUL; } - --executing->resource_count; + _Thread_Resource_count_decrement( executing ); _Thread_queue_Context_clear_priority_updates( queue_context ); _Thread_Wait_acquire_default_critical( executing, &lock_context ); @@ -416,7 +416,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Surrender( if ( _Objects_Is_local_id( new_owner->Object.id ) ) #endif { - ++new_owner->resource_count; + _Thread_Resource_count_increment( new_owner ); _Thread_Priority_add( new_owner, &the_mutex->Priority_ceiling, -- cgit v1.2.3