diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-30 11:39:58 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-04-06 09:08:20 +0200 |
commit | 9809d6e08264525ea58839b98e6d90121b841196 (patch) | |
tree | 7ccbdd61436c18d1e1bae9033a3907afb5bff629 /cpukit/score/include/rtems/score/coremsgimpl.h | |
parent | score: Fix _Thread_queue_Extract_locked() (diff) | |
download | rtems-9809d6e08264525ea58839b98e6d90121b841196.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/include/rtems/score/coremsgimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/coremsgimpl.h | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/cpukit/score/include/rtems/score/coremsgimpl.h b/cpukit/score/include/rtems/score/coremsgimpl.h index 407d3aee15..5b7abb2594 100644 --- a/cpukit/score/include/rtems/score/coremsgimpl.h +++ b/cpukit/score/include/rtems/score/coremsgimpl.h @@ -139,6 +139,16 @@ bool _CORE_message_queue_Initialize( size_t maximum_message_size ); +void _CORE_message_queue_Do_close( + CORE_message_queue_Control *the_message_queue, + uint32_t status +#if defined(RTEMS_MULTIPROCESSING) + , + Thread_queue_MP_callout mp_callout, + Objects_Id mp_id +#endif +); + /** * @brief Close a message queue. * @@ -150,16 +160,37 @@ bool _CORE_message_queue_Initialize( * flushing @a the_message_queue's task wait queue. * * @param[in] the_message_queue points to the message queue to close - * @param[in] remote_extract_callout is the routine to call for each thread - * that is extracted from the set of waiting threads * @param[in] status is the status that each waiting thread will return * from it's blocking service + * @param[in] mp_callout is the routine to call for each thread + * that is extracted from the set of waiting threads + * @param[in] mp_id the object identifier of the message queue object */ -void _CORE_message_queue_Close( - CORE_message_queue_Control *the_message_queue, - Thread_queue_Flush_callout remote_extract_callout, - uint32_t status -); +#if defined(RTEMS_MULTIPROCESSING) + #define _CORE_message_queue_Close( \ + the_message_queue, \ + status, \ + mp_callout, \ + mp_id \ + ) \ + _CORE_message_queue_Do_close( \ + the_message_queue, \ + status, \ + mp_callout, \ + mp_id \ + ) +#else + #define _CORE_message_queue_Close( \ + the_message_queue, \ + status, \ + mp_callout, \ + mp_id \ + ) \ + _CORE_message_queue_Do_close( \ + the_message_queue, \ + status \ + ) +#endif /** * @brief Flush pending messages. |