diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-23 11:40:18 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-05-25 12:43:54 +0200 |
commit | 631b3c8967a329cdd53e54365e4e4c0aa93a4251 (patch) | |
tree | 3a750b145a90c90aa86222c26ee68aeb8c87a417 /cpukit/score/src/coremsgbroadcast.c | |
parent | score: Get rid of mp_id parameter (diff) | |
download | rtems-631b3c8967a329cdd53e54365e4e4c0aa93a4251.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/src/coremsgbroadcast.c')
-rw-r--r-- | cpukit/score/src/coremsgbroadcast.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c index a7a962f16f..23dd343c05 100644 --- a/cpukit/score/src/coremsgbroadcast.c +++ b/cpukit/score/src/coremsgbroadcast.c @@ -21,28 +21,25 @@ #include <rtems/score/coremsgimpl.h> #include <rtems/score/objectimpl.h> -CORE_message_queue_Status _CORE_message_queue_Do_broadcast( +CORE_message_queue_Status _CORE_message_queue_Broadcast( CORE_message_queue_Control *the_message_queue, const void *buffer, size_t size, -#if defined(RTEMS_MULTIPROCESSING) - Thread_queue_MP_callout mp_callout, -#endif uint32_t *count, - ISR_lock_Context *lock_context + Thread_queue_Context *queue_context ) { Thread_Control *the_thread; uint32_t number_broadcasted; if ( size > the_message_queue->maximum_message_size ) { - _ISR_lock_ISR_enable( lock_context ); + _ISR_lock_ISR_enable( &queue_context->Lock_context ); return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; } number_broadcasted = 0; - _CORE_message_queue_Acquire_critical( the_message_queue, lock_context ); + _CORE_message_queue_Acquire_critical( the_message_queue, queue_context ); while ( ( the_thread = @@ -50,18 +47,17 @@ CORE_message_queue_Status _CORE_message_queue_Do_broadcast( the_message_queue, buffer, size, - mp_callout, 0, - lock_context + queue_context ) ) ) { number_broadcasted += 1; - _CORE_message_queue_Acquire( the_message_queue, lock_context ); + _CORE_message_queue_Acquire( the_message_queue, queue_context ); } - _CORE_message_queue_Release( the_message_queue, lock_context ); + _CORE_message_queue_Release( the_message_queue, queue_context ); *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; |