From 9809d6e08264525ea58839b98e6d90121b841196 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 30 Mar 2016 11:39:58 +0200 Subject: score: _Thread_queue_Flush() parameter changes Change _Thread_queue_Flush() into a macro that invokes _Thread_queue_Do_flush() with the parameter set defined by RTEMS_MULTIPROCESSING. For multiprocessing configurations add the object identifier to avoid direct use of the thread wait information. Use mp_ prefix for multiprocessing related parameters. Rename Thread_queue_Flush_callout to Thread_queue_MP_callout since this type will be re-used later for other operations as well. --- cpukit/score/include/rtems/score/coremuteximpl.h | 31 +++++++++++------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'cpukit/score/include/rtems/score/coremuteximpl.h') diff --git a/cpukit/score/include/rtems/score/coremuteximpl.h b/cpukit/score/include/rtems/score/coremuteximpl.h index a1cbb17734..812b6ba9cb 100644 --- a/cpukit/score/include/rtems/score/coremuteximpl.h +++ b/cpukit/score/include/rtems/score/coremuteximpl.h @@ -324,23 +324,20 @@ CORE_mutex_Status _CORE_mutex_Surrender( ISR_lock_Context *lock_context ); -/** - * @brief Flush all waiting threads. - * - * This routine assists in the deletion of a mutex by flushing the associated - * wait queue. - * - * @param[in] the_mutex is the mutex to flush - * @param[in] remote_extract_callout is the routine to invoke when a remote - * thread is extracted - * @param[in] status is the status value which each unblocked thread will - * return to its caller. - */ -void _CORE_mutex_Flush( - CORE_mutex_Control *the_mutex, - Thread_queue_Flush_callout remote_extract_callout, - uint32_t status -); +/* Must be a macro due to the multiprocessing dependent parameters */ +#define _CORE_mutex_Flush( \ + the_mutex, \ + status, \ + mp_callout, \ + mp_id \ +) \ + _Thread_queue_Flush( \ + &( the_mutex )->Wait_queue, \ + ( the_mutex )->operations, \ + status, \ + mp_callout, \ + mp_id \ + ) /** * @brief Is mutex locked. -- cgit v1.2.3