2008-09-26 Joel Sherrill <joel.sherrill@OARcorp.com>

PR 1316/cpukit
	* score/src/coremsgbroadcast.c: Give error when message is too large
	like when sending a message. This was the documented behavior.
This commit is contained in:
Joel Sherrill
2008-09-26 18:37:12 +00:00
parent 44a2f5d6c3
commit 52efd7de67
2 changed files with 11 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
2008-09-26 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1316/cpukit
* score/src/coremsgbroadcast.c: Give error when message is too large
like when sending a message. This was the documented behavior.
2008-09-16 Gene Smith <gene.smith@siemens.com>
PR 564/cpukit

View File

@@ -66,7 +66,10 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
uint32_t constrained_size;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
}
/*
* If there are pending messages, then there can't be threads
@@ -92,14 +95,10 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
waitp = &the_thread->Wait;
number_broadcasted += 1;
constrained_size = size;
if ( size > the_message_queue->maximum_message_size )
constrained_size = the_message_queue->maximum_message_size;
_CORE_message_queue_Copy_buffer(
buffer,
waitp->return_argument,
constrained_size
size
);
*(uint32_t *)the_thread->Wait.return_argument_1 = size;