diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-28 06:26:01 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-02 07:46:16 +0200 |
commit | 500a8e9c62dca9f62611ecca64857dadb2bc0557 (patch) | |
tree | 1ffd836015e5397eeac688dc1c6ced38d587c40e /cpukit/score/src | |
parent | score: Avoid Giant lock for set time of day (diff) | |
download | rtems-500a8e9c62dca9f62611ecca64857dadb2bc0557.tar.bz2 |
score: Delete __RTEMS_STRICT_ORDER_MUTEX__
Remove support for strict order mutexes.
Close #2124.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/coremutex.c | 6 | ||||
-rw-r--r-- | cpukit/score/src/coremutexsurrender.c | 55 | ||||
-rw-r--r-- | cpukit/score/src/threadinitialize.c | 5 |
3 files changed, 0 insertions, 66 deletions
diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c index 75e0c49592..8fc3a406d9 100644 --- a/cpukit/score/src/coremutex.c +++ b/cpukit/score/src/coremutex.c @@ -67,12 +67,6 @@ CORE_mutex_Status _CORE_mutex_Initialize( return CORE_MUTEX_STATUS_CEILING_VIOLATED; } -#ifdef __RTEMS_STRICT_ORDER_MUTEX__ - _Chain_Prepend_unprotected( &executing->lock_mutex, - &the_mutex->queue.lock_queue ); - the_mutex->queue.priority_before = executing->current_priority; -#endif - executing->resource_count++; if ( is_priority_ceiling ) { 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, diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 18d29f8d1a..c3e6469679 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -145,11 +145,6 @@ bool _Thread_Initialize( } _Thread_queue_Heads_initialize( the_thread->Wait.spare_heads ); - #ifdef __RTEMS_STRICT_ORDER_MUTEX__ - /* Initialize the head of chain of held mutexes */ - _Chain_Initialize_empty(&the_thread->lock_mutex); - #endif - /* * General initialization */ |