From 9276fdec2ec381e455e81f0fe3175d574579f631 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 11 May 2016 17:52:13 +0200 Subject: score: Fix CORE mutex initialization The priority inheritance and ceiling CORE mutexes wrongly used the FIFO queueing discipline. Delete misleading _CORE_mutex_Is_priority(). Bug introduced by 1e1a91ed11458ddbb27b94d0001d8f0fc2ef7a97. Add test sptests/spmutex01, since no existing uni-processor test covered the thread priority queueing discipline for CORE mutexes. --- cpukit/score/src/coremutex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpukit/score/src/coremutex.c') diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c index 8fc3a406d9..ea5e759dc4 100644 --- a/cpukit/score/src/coremutex.c +++ b/cpukit/score/src/coremutex.c @@ -82,10 +82,10 @@ CORE_mutex_Status _CORE_mutex_Initialize( _Thread_queue_Initialize( &the_mutex->Wait_queue ); - if ( _CORE_mutex_Is_priority( the_mutex_attributes ) ) { - the_mutex->operations = &_Thread_queue_Operations_priority; - } else { + if ( _CORE_mutex_Is_fifo( the_mutex_attributes ) ) { the_mutex->operations = &_Thread_queue_Operations_FIFO; + } else { + the_mutex->operations = &_Thread_queue_Operations_priority; } return CORE_MUTEX_STATUS_SUCCESSFUL; -- cgit v1.2.3