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/coremsg.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 'cpukit/score/src/coremsg.c')
-rw-r--r-- | cpukit/score/src/coremsg.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c index b7448ab1fd..ca5dfcfbeb 100644 --- a/cpukit/score/src/coremsg.c +++ b/cpukit/score/src/coremsg.c @@ -7,7 +7,7 @@ * This core object provides task synchronization and communication functions * via messages passed to queue objects. * - * COPYRIGHT (c) 1989-1999. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -30,8 +30,7 @@ #include <rtems/score/thread.h> #include <rtems/score/wkspace.h> -/*PAGE - * +/* * _CORE_message_queue_Initialize * * This routine initializes a newly created message queue based on the @@ -62,19 +61,16 @@ bool _CORE_message_queue_Initialize( the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; - #if defined(RTEMS_SCORE_COREMSG_ENABLE_NOTIFICATION) - _CORE_message_queue_Set_notify( the_message_queue, NULL, NULL ); - #endif + _CORE_message_queue_Set_notify( the_message_queue, NULL, NULL ); /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ - allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { - allocated_message_size += sizeof(uint32_t); - allocated_message_size &= ~(sizeof(uint32_t) - 1); + allocated_message_size += sizeof(uint32_t); + allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) |