summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/coremuteximpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-31 16:10:32 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-03 10:55:48 +0100
commit0dd49d001515897cceb9195eb97dfac683552a0b (patch)
tree4d43cf8b2fb32ae17ffc0d7d6109f02e44dcedca /cpukit/score/include/rtems/score/coremuteximpl.h
parentrtems: Fix binary semaphore resource count (diff)
downloadrtems-0dd49d001515897cceb9195eb97dfac683552a0b.tar.bz2
score: Introduce thread resource count methods
This makes it easier to conditionally enable/disable the thread resource count usage.
Diffstat (limited to 'cpukit/score/include/rtems/score/coremuteximpl.h')
-rw-r--r--cpukit/score/include/rtems/score/coremuteximpl.h10
1 files changed, 5 insertions, 5 deletions
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,