From 33e250c9fa370f620ddbc5850342d5a90b123524 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 27 May 2016 15:41:41 +0200 Subject: score: Rework CORE priority ceiling mutex Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines. --- cpukit/score/src/coremutex.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'cpukit/score/src/coremutex.c') diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c index 6f73c1bd16..9c6b7a8b93 100644 --- a/cpukit/score/src/coremutex.c +++ b/cpukit/score/src/coremutex.c @@ -39,41 +39,9 @@ Status_Control _CORE_mutex_Initialize( the_mutex->Attributes = *the_mutex_attributes; if ( initially_locked ) { - bool is_priority_ceiling; - Priority_Control ceiling; - Per_CPU_Control *cpu_self; - the_mutex->nest_count = 1; the_mutex->holder = executing; - - /* The mutex initialization is only protected by the allocator lock */ - cpu_self = _Thread_Dispatch_disable(); - - is_priority_ceiling = - _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ); - ceiling = the_mutex->Attributes.priority_ceiling; - - /* - * The test to check for a ceiling violation is a bit arbitrary. In case - * this thread is the owner of a priority inheritance mutex, then it may - * get a higher priority later or anytime on SMP configurations. - */ - if ( is_priority_ceiling && executing->current_priority < ceiling ) { - /* - * There is no need to undo the previous work since this error aborts - * the object creation. - */ - _Thread_Dispatch_enable( cpu_self ); - return STATUS_MUTEX_CEILING_VIOLATED; - } - executing->resource_count++; - - if ( is_priority_ceiling ) { - _Thread_Raise_priority( executing, ceiling ); - } - - _Thread_Dispatch_enable( cpu_self ); } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; -- cgit v1.2.3