From 5a598ac99b0de720a04afc5e2ac6764117589b90 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 27 May 2016 08:02:03 +0200 Subject: score: Add CORE mutex variants Add CORE_recursive_mutex_Control and CORE_ceiling_mutex_Control to avoid the run-time evaluation of attributes to figure out how a particular mutex methods should behave. Start with the no protocol variants. This eliminates the CORE_MUTEX_DISCIPLINES_FIFO and CORE_MUTEX_DISCIPLINES_PRIORITY disciplines. --- cpukit/rtems/src/semdelete.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cpukit/rtems/src/semdelete.c') diff --git a/cpukit/rtems/src/semdelete.c b/cpukit/rtems/src/semdelete.c index 34da496b8d..365d895362 100644 --- a/cpukit/rtems/src/semdelete.c +++ b/cpukit/rtems/src/semdelete.c @@ -51,7 +51,12 @@ rtems_status_code rtems_semaphore_delete( switch ( the_semaphore->variant ) { case SEMAPHORE_VARIANT_MUTEX: - if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) ) { + case SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL: + if ( + _CORE_mutex_Is_locked( + &the_semaphore->Core_control.Mutex.Recursive.Mutex + ) + ) { status = STATUS_RESOURCE_IN_USE; } else { status = STATUS_SUCCESSFUL; @@ -92,6 +97,7 @@ rtems_status_code rtems_semaphore_delete( default: _Assert( the_semaphore->variant == SEMAPHORE_VARIANT_MUTEX + || the_semaphore->variant == SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL || the_semaphore->variant == SEMAPHORE_VARIANT_SIMPLE_BINARY || the_semaphore->variant == SEMAPHORE_VARIANT_COUNTING ); -- cgit v1.2.3