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/coremsgsubmit.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/coremsgsubmit.c')
-rw-r--r-- | cpukit/score/src/coremsgsubmit.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c index 68067cccb6..a86774175f 100644 --- a/cpukit/score/src/coremsgsubmit.c +++ b/cpukit/score/src/coremsgsubmit.c @@ -25,25 +25,22 @@ #include <rtems/score/statesimpl.h> #include <rtems/score/wkspace.h> -CORE_message_queue_Status _CORE_message_queue_Do_submit( +CORE_message_queue_Status _CORE_message_queue_Submit( CORE_message_queue_Control *the_message_queue, Thread_Control *executing, const void *buffer, size_t size, -#if defined(RTEMS_MULTIPROCESSING) - Thread_queue_MP_callout mp_callout, -#endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout, - ISR_lock_Context *lock_context + Thread_queue_Context *queue_context ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { - _CORE_message_queue_Release( the_message_queue, lock_context ); + _CORE_message_queue_Release( the_message_queue, queue_context ); return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; } @@ -55,9 +52,8 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( the_message_queue, buffer, size, - mp_callout, submit_type, - lock_context + queue_context ); if ( the_thread != NULL ) { return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; @@ -90,20 +86,20 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( ) { ( *the_message_queue->notify_handler )( the_message_queue, - lock_context + queue_context ); } else { - _CORE_message_queue_Release( the_message_queue, lock_context ); + _CORE_message_queue_Release( the_message_queue, queue_context ); } #else - _CORE_message_queue_Release( the_message_queue, lock_context ); + _CORE_message_queue_Release( the_message_queue, queue_context ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND) - _CORE_message_queue_Release( the_message_queue, lock_context ); + _CORE_message_queue_Release( the_message_queue, queue_context ); return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; #else /* @@ -112,7 +108,7 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( * on the queue. */ if ( !wait ) { - _CORE_message_queue_Release( the_message_queue, lock_context ); + _CORE_message_queue_Release( the_message_queue, queue_context ); return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; } @@ -121,7 +117,7 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { - _CORE_message_queue_Release( the_message_queue, lock_context ); + _CORE_message_queue_Release( the_message_queue, queue_context ); return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; } @@ -143,7 +139,7 @@ CORE_message_queue_Status _CORE_message_queue_Do_submit( STATES_WAITING_FOR_MESSAGE, timeout, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT, - lock_context + &queue_context->Lock_context ); return executing->Wait.return_code; #endif |