diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-13 16:05:14 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-13 16:05:14 +0000 |
commit | 939ba8162fd32d4ce918b0b994adda8511641364 (patch) | |
tree | 850dfd391ca0c39c2a7f6acfecea52001474e7fd /cpukit/score/src/coremsgsubmit.c | |
parent | Don't cvsignore rtems*.spec. (diff) | |
download | rtems-939ba8162fd32d4ce918b0b994adda8511641364.tar.bz2 |
2009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/inline/rtems/score/coremsg.inl, score/src/coremsg.c,
score/src/coremsgbroadcast.c, score/src/coremsginsert.c,
score/src/coremsgseize.c, score/src/coremsgsubmit.c: Add wrappers for
accessing message priority. Since these are empty when priority-based
message queues are disabled, this eliminates some of the
conditionals.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/src/coremsgsubmit.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c index d52746e9ac..def07005bd 100644 --- a/cpukit/score/src/coremsgsubmit.c +++ b/cpukit/score/src/coremsgsubmit.c @@ -59,11 +59,12 @@ CORE_message_queue_Status _CORE_message_queue_Submit( const void *buffer, size_t size, Objects_Id id, -#if defined(RTEMS_MULTIPROCESSING) - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, -#else - CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), -#endif + #if defined(RTEMS_MULTIPROCESSING) + CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, + #else + CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), + #else + #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout @@ -90,10 +91,10 @@ CORE_message_queue_Status _CORE_message_queue_Submit( *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = submit_type; -#if defined(RTEMS_MULTIPROCESSING) - if ( !_Objects_Is_local_id( the_thread->Object.id ) ) - (*api_message_queue_mp_support) ( the_thread, id ); -#endif + #if defined(RTEMS_MULTIPROCESSING) + if ( !_Objects_Is_local_id( the_thread->Object.id ) ) + (*api_message_queue_mp_support) ( the_thread, id ); + #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } } @@ -123,9 +124,7 @@ CORE_message_queue_Status _CORE_message_queue_Submit( size ); the_message->Contents.size = size; - #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) - the_message->priority = submit_type; - #endif + _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( the_message_queue, |