summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/coremsgsubmit.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-11-28 16:36:14 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-11-28 16:36:14 +0000
commite5a80202a815fc459172b05da80b900050dec025 (patch)
tree6009ef6bf9cb8f8367de49e7ac39c6f15fc23b0f /cpukit/score/src/coremsgsubmit.c
parent2011-11-27 Sebastien Bourdeauducq <seb@tmplab.org> (diff)
downloadrtems-e5a80202a815fc459172b05da80b900050dec025.tar.bz2
2011-11-28 Werner Almesberger <werner@almesberger.net>
PR 1961/cpukit * score/src/coremsgsubmit.c: Close window caused by using message pending count rather than directly obtaining unused buffer.
Diffstat (limited to 'cpukit/score/src/coremsgsubmit.c')
-rw-r--r--cpukit/score/src/coremsgsubmit.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
index 79b93b4d26..93fb98bd43 100644
--- a/cpukit/score/src/coremsgsubmit.c
+++ b/cpukit/score/src/coremsgsubmit.c
@@ -101,21 +101,9 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
- if ( the_message_queue->number_of_pending_messages <
- the_message_queue->maximum_pending_messages ) {
-
- the_message =
- _CORE_message_queue_Allocate_message_buffer( the_message_queue );
-
- #if defined(RTEMS_DEBUG)
- /*
- * NOTE: If the system is consistent, this error should never occur.
- */
-
- if ( !the_message )
- return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
- #endif
-
+ the_message =
+ _CORE_message_queue_Allocate_message_buffer( the_message_queue );
+ if ( the_message ) {
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,