summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-27 14:29:00 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-03-31 10:14:42 +0200
commitb1ce11614b615065505cee398645e995e4cee39f (patch)
tree65e432f37ad0333a04a466ee05395dd78391f5c0 /cpukit/score
parentscore: Delete CORE_mutex_Control::blocked_count (diff)
downloadrtems-b1ce11614b615065505cee398645e995e4cee39f.tar.bz2
score: Delete CORE_mutex_Control::holder_id
We can use the holder pointer to get the identifier if necessary.
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/include/rtems/score/coremutex.h2
-rw-r--r--cpukit/score/include/rtems/score/coremuteximpl.h1
-rw-r--r--cpukit/score/src/coremutex.c2
-rw-r--r--cpukit/score/src/coremutexsurrender.c5
4 files changed, 1 insertions, 9 deletions
diff --git a/cpukit/score/include/rtems/score/coremutex.h b/cpukit/score/include/rtems/score/coremutex.h
index be11cb6325..a29aee5ac8 100644
--- a/cpukit/score/include/rtems/score/coremutex.h
+++ b/cpukit/score/include/rtems/score/coremutex.h
@@ -167,8 +167,6 @@ typedef struct {
* has not unlocked it. If the thread is not locked, there is no holder.
*/
Thread_Control *holder;
- /** This element contains the object Id of the holding thread. */
- Objects_Id holder_id;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
/** This field is used to manipulate the priority inheritance mutex queue*/
CORE_mutex_order_list queue;
diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h
index f2a7ca7813..497843850f 100644
--- a/cpukit/score/include/rtems/score/coremuteximpl.h
+++ b/cpukit/score/include/rtems/score/coremuteximpl.h
@@ -454,7 +454,6 @@ RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body(
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
- the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ){
diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c
index 4cdc7647d1..1c6c3db302 100644
--- a/cpukit/score/src/coremutex.c
+++ b/cpukit/score/src/coremutex.c
@@ -42,7 +42,6 @@ CORE_mutex_Status _CORE_mutex_Initialize(
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = executing;
- the_mutex->holder_id = executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
@@ -60,7 +59,6 @@ CORE_mutex_Status _CORE_mutex_Initialize(
} else {
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
- the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
index 11e8cd4489..de1c744c2c 100644
--- a/cpukit/score/src/coremutexsurrender.c
+++ b/cpukit/score/src/coremutexsurrender.c
@@ -172,8 +172,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
_Thread_Change_priority( holder, holder->real_priority, true );
}
}
- the_mutex->holder = NULL;
- the_mutex->holder_id = 0;
+ the_mutex->holder = NULL;
/*
* Now we check if another thread was waiting for this mutex. If so,
@@ -185,7 +184,6 @@ CORE_mutex_Status _CORE_mutex_Surrender(
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
the_mutex->holder = NULL;
- the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
( *api_mutex_mp_support)( the_thread, id );
@@ -195,7 +193,6 @@ CORE_mutex_Status _CORE_mutex_Surrender(
{
the_mutex->holder = the_thread;
- the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {