summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremutexsurrender.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-28 06:26:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-02 07:46:16 +0200
commit500a8e9c62dca9f62611ecca64857dadb2bc0557 (patch)
tree1ffd836015e5397eeac688dc1c6ced38d587c40e /cpukit/score/src/coremutexsurrender.c
parentscore: Avoid Giant lock for set time of day (diff)
downloadrtems-500a8e9c62dca9f62611ecca64857dadb2bc0557.tar.bz2
score: Delete __RTEMS_STRICT_ORDER_MUTEX__
Remove support for strict order mutexes. Close #2124.
Diffstat (limited to '')
-rw-r--r--cpukit/score/src/coremutexsurrender.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
index 1858f9c311..cf6f0968b6 100644
--- a/cpukit/score/src/coremutexsurrender.c
+++ b/cpukit/score/src/coremutexsurrender.c
@@ -23,51 +23,6 @@
#include <rtems/score/coremuteximpl.h>
#include <rtems/score/thread.h>
-#ifdef __RTEMS_STRICT_ORDER_MUTEX__
- static inline void _CORE_mutex_Push_priority(
- CORE_mutex_Control *mutex,
- Thread_Control *thread
- )
- {
- _Chain_Prepend_unprotected(
- &thread->lock_mutex,
- &mutex->queue.lock_queue
- );
- mutex->queue.priority_before = thread->current_priority;
- }
-
- static inline CORE_mutex_Status _CORE_mutex_Pop_priority(
- CORE_mutex_Control *mutex,
- Thread_Control *holder
- )
- {
- /*
- * Check whether the holder release the mutex in LIFO order if not return
- * error code.
- */
- if ( _Chain_First( &holder->lock_mutex ) != &mutex->queue.lock_queue ) {
- mutex->nest_count++;
-
- return CORE_MUTEX_RELEASE_NOT_ORDER;
- }
-
- /*
- * This pops the first node from the list.
- */
- _Chain_Get_first_unprotected( &holder->lock_mutex );
-
- if ( mutex->queue.priority_before != holder->current_priority )
- _Thread_Change_priority( holder, mutex->queue.priority_before, true );
-
- return CORE_MUTEX_STATUS_SUCCESSFUL;
- }
-#else
- #define _CORE_mutex_Push_priority( mutex, thread ) ((void) 0)
-
- #define _CORE_mutex_Pop_priority( mutex, thread ) \
- CORE_MUTEX_STATUS_SUCCESSFUL
-#endif
-
CORE_mutex_Status _CORE_mutex_Do_surrender(
CORE_mutex_Control *the_mutex,
#if defined(RTEMS_MULTIPROCESSING)
@@ -142,14 +97,6 @@ CORE_mutex_Status _CORE_mutex_Do_surrender(
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
- CORE_mutex_Status pop_status =
- _CORE_mutex_Pop_priority( the_mutex, holder );
-
- if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) {
- _Thread_queue_Release( &the_mutex->Wait_queue, lock_context );
- return pop_status;
- }
-
holder->resource_count--;
}
the_mutex->holder = NULL;
@@ -193,12 +140,10 @@ CORE_mutex_Status _CORE_mutex_Do_surrender(
case CORE_MUTEX_DISCIPLINES_PRIORITY:
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
- _CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
_Thread_queue_Boost_priority( &the_mutex->Wait_queue.Queue, the_thread );
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
- _CORE_mutex_Push_priority( the_mutex, the_thread );
the_thread->resource_count++;
_Thread_Raise_priority(
the_thread,