summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-26 19:24:27 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-26 19:24:27 +0000
commit7cb469431117ec10590f84620c0c46e104f60d71 (patch)
treeaa0503329e73dfed33489629e98384bd54ed7eb7 /cpukit
parent2008-09-26 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-7cb469431117ec10590f84620c0c46e104f60d71.tar.bz2
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.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/score/src/coremsgbroadcast.c13
2 files changed, 12 insertions, 7 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 727b51de75..dc11dd912b 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -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-26 Eric Norum <norume@aps.anl.gov>
* libnetworking/lib/rtems_bsdnet_ntp.c: Final resolution of this "small" port number change.
diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c
index 75bbae967b..91066054f3 100644
--- a/cpukit/score/src/coremsgbroadcast.c
+++ b/cpukit/score/src/coremsgbroadcast.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-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -63,7 +63,10 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
- size_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
@@ -89,14 +92,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_second.mutable_object,
- constrained_size
+ size
);
*(size_t *) the_thread->Wait.return_argument = size;