From 3d83ae583c5be8d499374bcbd7a6d801ebffbec3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 28 Nov 2011 16:36:31 +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') diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c index c67157dc44..9d4b68d5c0 100644 --- a/cpukit/score/src/coremsgsubmit.c +++ b/cpukit/score/src/coremsgsubmit.c @@ -102,21 +102,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