From f773c0122a4412a8846764a35cccb241efa034c2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 5 Aug 2008 13:32:39 +0000 Subject: 2008-08-04 Sebastian Huber * rtems/include/rtems/rtems/sem.h, rtems/src/semobtain.c: Changed option set type to rtems_option. * score/src/objectgetinfo.c: Check return value of _Objects_API_maximum_class(). * libmisc/monitor/mon-mpci.c, libmisc/monitor/monitor.h, rtems/include/rtems/rtems/message.h, rtems/src/msgmp.c, rtems/src/msgqallocate.c, rtems/src/msgqbroadcast.c, rtems/src/msgqcreate.c, rtems/src/msgqreceive.c, rtems/src/msgqsend.c, rtems/src/msgqurgent.c, score/include/rtems/score/coremsg.h, score/include/rtems/score/mpci.h, score/include/rtems/score/thread.h, score/inline/rtems/score/coremsg.inl, score/src/coremsg.c, score/src/coremsgbroadcast.c, score/src/coremsgseize.c, score/src/coremsgsubmit.c: Removed parameters of _Message_queue_Allocate(). Changed option set type to rtems_option. Changed type of maximum message and packet size to size_t. Changed the input buffer type for message send functions to "const void *". Changed the pointer to the second return argument in the thread wait information to a union. This union can contain a pointer to an immutable or a mutable object. This is somewhat fragile. An alternative would be to add a third pointer for immutable objects, but this would increase the structure size. --- cpukit/score/src/coremsgsubmit.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cpukit/score/src/coremsgsubmit.c') diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c index 2f1ea815ca..9882d1c811 100644 --- a/cpukit/score/src/coremsgsubmit.c +++ b/cpukit/score/src/coremsgsubmit.c @@ -59,7 +59,7 @@ CORE_message_queue_Status _CORE_message_queue_Submit( CORE_message_queue_Control *the_message_queue, - void *buffer, + const void *buffer, size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, @@ -85,10 +85,10 @@ CORE_message_queue_Status _CORE_message_queue_Submit( if ( the_thread ) { _CORE_message_queue_Copy_buffer( buffer, - the_thread->Wait.return_argument, + the_thread->Wait.return_argument_second.mutable_object, size ); - *(size_t *)the_thread->Wait.return_argument_1 = size; + *(size_t *) the_thread->Wait.return_argument = size; the_thread->Wait.count = submit_type; #if defined(RTEMS_MULTIPROCESSING) @@ -165,11 +165,11 @@ CORE_message_queue_Status _CORE_message_queue_Submit( _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); - executing->Wait.queue = &the_message_queue->Wait_queue; - executing->Wait.id = id; - executing->Wait.return_argument = buffer; - executing->Wait.option = size; - executing->Wait.count = submit_type; + executing->Wait.queue = &the_message_queue->Wait_queue; + executing->Wait.id = id; + executing->Wait.return_argument_second.immutable_object = buffer; + executing->Wait.option = (uint32_t) size; + executing->Wait.count = submit_type; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); -- cgit v1.2.3