Changeset fd1661f2 in rtems


Ignore:
Timestamp:
Sep 9, 2011, 11:19:42 AM (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
842394f
Parents:
5817297
Message:

2011-09-09 Sebastian Huber <sebastian.huber@…>

PR 1844/cpukit

  • rtems/include/rtems/rtems/msgmp.h: Define MESSAGE_QUEUE_MP_PACKET_SIZE.
  • rtems/src/msgmp.c, rtems/src/msgqcreate.c: Use MESSAGE_QUEUE_MP_PACKET_SIZE.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r5817297 rfd1661f2  
     12011-09-09      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        PR 1844/cpukit
     4        * rtems/include/rtems/rtems/msgmp.h: Define
     5        MESSAGE_QUEUE_MP_PACKET_SIZE.
     6        * rtems/src/msgmp.c, rtems/src/msgqcreate.c: Use
     7        MESSAGE_QUEUE_MP_PACKET_SIZE.
     8
    192011-09-09      Sebastian Huber <sebastian.huber@embedded-brains.de>
    210
  • cpukit/rtems/include/rtems/rtems/msgmp.h

    r5817297 rfd1661f2  
    7676  CORE_message_queue_Buffer          Buffer;
    7777}   Message_queue_MP_Packet;
     78
     79#define MESSAGE_QUEUE_MP_PACKET_SIZE \
     80  offsetof(Message_queue_MP_Packet, Buffer.buffer)
    7881
    7982/**
  • cpukit/rtems/src/msgmp.c

    r5817297 rfd1661f2  
    2727#include <rtems/score/watchdog.h>
    2828#include <rtems/rtems/support.h>
    29 
    30 #define MESSAGE_QUEUE_MP_PACKET_SIZE \
    31   offsetof(Message_queue_MP_Packet, Buffer.buffer)
    3229
    3330RTEMS_STATIC_ASSERT(
     
    117114      the_packet                    = _Message_queue_MP_Get_packet();
    118115      the_packet->Prefix.the_class  = MP_PACKET_MESSAGE_QUEUE;
    119       the_packet->Prefix.length     = sizeof(Message_queue_MP_Packet);
     116      the_packet->Prefix.length     = MESSAGE_QUEUE_MP_PACKET_SIZE;
    120117      if ( size_p )
    121118        the_packet->Prefix.length     += *size_p;
    122       the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
     119      the_packet->Prefix.to_convert = MESSAGE_QUEUE_MP_PACKET_SIZE;
    123120
    124121      /*
     
    163160      the_packet                    = _Message_queue_MP_Get_packet();
    164161      the_packet->Prefix.the_class  = MP_PACKET_MESSAGE_QUEUE;
    165       the_packet->Prefix.length     = sizeof(Message_queue_MP_Packet);
    166       the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
     162      the_packet->Prefix.length     = MESSAGE_QUEUE_MP_PACKET_SIZE;
     163      the_packet->Prefix.to_convert = MESSAGE_QUEUE_MP_PACKET_SIZE;
    167164
    168165      if (! _Options_Is_no_wait(option_set))
  • cpukit/rtems/src/msgqcreate.c

    r5817297 rfd1661f2  
    9696
    9797  max_packet_payload_size = _MPCI_table->maximum_packet_size
    98     - sizeof ( Message_queue_MP_Packet );
     98    - MESSAGE_QUEUE_MP_PACKET_SIZE;
    9999  if ( is_global && max_packet_payload_size < max_message_size )
    100100    return RTEMS_INVALID_SIZE;
Note: See TracChangeset for help on using the changeset viewer.