From e5a80202a815fc459172b05da80b900050dec025 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 28 Nov 2011 16:36:14 +0000 Subject: 2011-11-28 Werner Almesberger PR 1961/cpukit * score/src/coremsgsubmit.c: Close window caused by using message pending count rather than directly obtaining unused buffer. --- cpukit/score/src/coremsgsubmit.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'cpukit/score/src/coremsgsubmit.c') 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, -- cgit v1.2.3