From 631b3c8967a329cdd53e54365e4e4c0aa93a4251 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 23 May 2016 11:40:18 +0200 Subject: score: Move thread queue MP callout to context Drop the multiprocessing (MP) dependent callout parameter from the thread queue extract, dequeue, flush and unblock methods. Merge this parameter with the lock context into new structure Thread_queue_Context. This helps to gets rid of the conditionally compiled method call helpers. --- cpukit/rtems/src/semrelease.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cpukit/rtems/src/semrelease.c') diff --git a/cpukit/rtems/src/semrelease.c b/cpukit/rtems/src/semrelease.c index c39455c167..197e4d81b0 100644 --- a/cpukit/rtems/src/semrelease.c +++ b/cpukit/rtems/src/semrelease.c @@ -30,9 +30,13 @@ rtems_status_code rtems_semaphore_release( rtems_id id ) CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; rtems_attribute attribute_set; - ISR_lock_Context lock_context; + Thread_queue_Context queue_context; - the_semaphore = _Semaphore_Get( id, &lock_context ); + the_semaphore = _Semaphore_Get( + id, + &queue_context, + _Semaphore_Core_mutex_mp_support + ); if ( the_semaphore == NULL ) { #if defined(RTEMS_MULTIPROCESSING) @@ -50,7 +54,7 @@ rtems_status_code rtems_semaphore_release( rtems_id id ) mrsp_status = _MRSP_Surrender( &the_semaphore->Core_control.mrsp, _Thread_Executing, - &lock_context + &queue_context ); return _Semaphore_Translate_MRSP_status_code( mrsp_status ); } else @@ -58,15 +62,13 @@ rtems_status_code rtems_semaphore_release( rtems_id id ) if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { mutex_status = _CORE_mutex_Surrender( &the_semaphore->Core_control.mutex, - _Semaphore_Core_mutex_mp_support, - &lock_context + &queue_context ); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( &the_semaphore->Core_control.semaphore, - _Semaphore_Core_mutex_mp_support, - &lock_context + &queue_context ); return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } -- cgit v1.2.3