Changeset b06e68ef in rtems for cpukit/rtems


Ignore:
Timestamp:
Aug 17, 1995, 7:51:51 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
95fbca1
Parents:
3b438fa
Message:

Numerous miscellaneous features incorporated from Tony Bennett
(tbennett@…) including the following major additions:

+ variable length messages
+ named devices
+ debug monitor
+ association tables/variables

Location:
cpukit/rtems
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/include/rtems/rtems/message.h

    r3b438fa rb06e68ef  
    4242 *  The following defines the data types needed to manipulate
    4343 *  the contents of message buffers.
     44 *  Since msgs are variable length we just make a ptr to 1.
    4445 */
    4546
    4647typedef struct {
    47   unsigned32 field1;
    48   unsigned32 field2;
    49   unsigned32 field3;
    50   unsigned32 field4;
    51 }  Message_queue_Buffer;
     48    unsigned32  size;
     49
     50#ifndef __cplusplus
     51                               /* NOTE:   [0] is gcc specific,
     52                                *   but specifically disallowed by ANSI STD C++
     53                                * g++ warns about it, so we #ifdef it out to
     54                                * get rid of warnings when compiled by g++.
     55                                */
     56    unsigned32  buffer[0];
     57#endif
     58
     59} Message_queue_Buffer;
    5260
    5361/*
     
    6977  Objects_Control      Object;
    7078  Thread_queue_Control Wait_queue;
    71   rtems_attribute   attribute_set;
     79  rtems_attribute      attribute_set;
    7280  unsigned32           maximum_pending_messages;
    7381  unsigned32           number_of_pending_messages;
     82  unsigned32           maximum_message_size;
    7483  Chain_Control        Pending_messages;
     84  Message_queue_Buffer *message_buffers;
     85  Chain_Control        Inactive_messages;
    7586}   Message_queue_Control;
    7687
     
    8192
    8293EXTERN Objects_Information  _Message_queue_Information;
    83 
    84 /*
    85  *  The following defines the data structures used to
    86  *  manage the pool of inactive message buffers.
    87  */
    88 
    89 EXTERN Chain_Control _Message_queue_Inactive_messages;
    9094
    9195/*
     
    109113
    110114void _Message_queue_Manager_initialization(
    111   unsigned32 maximum_message_queues,
    112   unsigned32 maximum_messages
     115  unsigned32 maximum_message_queues
    113116);
    114117
     
    127130
    128131rtems_status_code rtems_message_queue_create(
    129   Objects_Name        name,
    130   unsigned32          count,
     132  Objects_Name     name,
     133  unsigned32       count,
     134  unsigned32       max_message_size,
    131135  rtems_attribute  attribute_set,
    132   Objects_Id         *id
     136  Objects_Id      *id
    133137);
    134138
     
    184188rtems_status_code rtems_message_queue_send(
    185189  Objects_Id            id,
    186   void                 *buffer
     190  void                 *buffer,
     191  unsigned32            size
    187192);
    188193
     
    205210rtems_status_code rtems_message_queue_urgent(
    206211  Objects_Id            id,
    207   void                 *buffer
     212  void                 *buffer,
     213  unsigned32            size
    208214);
    209215
     
    227233  Objects_Id            id,
    228234  void                 *buffer,
     235  unsigned32            size,
    229236  unsigned32           *count
    230237);
     
    247254  Objects_Id            id,
    248255  void                 *buffer,
     256  unsigned32           *size_p,
    249257  unsigned32            option_set,
    250   rtems_interval     timeout
     258  rtems_interval        timeout
    251259);
    252260
     
    277285
    278286STATIC INLINE void _Message_queue_Copy_buffer (
    279   Message_queue_Buffer *source,
    280   Message_queue_Buffer *destination
     287  void      *source,
     288  void      *destination,
     289  unsigned32 size
    281290);
    282291
     
    296305  Message_queue_Control *the_message_queue,
    297306  unsigned32             option_set,
    298   Message_queue_Buffer  *buffer
     307  void                  *buffer,
     308  unsigned32            *size_p
    299309);
    300310
     
    323333rtems_status_code _Message_queue_Submit(
    324334  Objects_Id                  id,
    325   Message_queue_Buffer       *buffer,
     335  void                       *buffer,
     336  unsigned32                  size,
    326337  Message_queue_Submit_types  submit_type
    327338);
     
    337348
    338349STATIC INLINE Message_queue_Buffer_control *
    339   _Message_queue_Allocate_message_buffer ( void );
     350  _Message_queue_Allocate_message_buffer (
     351   Message_queue_Control *the_message_queue
     352);
    340353
    341354/*
     
    349362
    350363STATIC INLINE void _Message_queue_Free_message_buffer (
     364  Message_queue_Control        *the_message_queue,
    351365  Message_queue_Buffer_control *the_message
    352366);
     
    416430 */
    417431
    418 STATIC INLINE Message_queue_Control *_Message_queue_Allocate ( void );
     432Message_queue_Control *_Message_queue_Allocate (
     433    unsigned32          count,
     434    unsigned32          max_message_size
     435);
    419436
    420437/*
     
    423440 *  DESCRIPTION:
    424441 *
    425  *  This routine allocates a message queue control block from
     442 *  This routine deallocates a message queue control block into
    426443 *  the inactive chain of free message queue control blocks.
    427444 */
  • cpukit/rtems/include/rtems/rtems/msgmp.h

    r3b438fa rb06e68ef  
    5656
    5757typedef struct {
    58   rtems_packet_prefix                   Prefix;
     58  rtems_packet_prefix                Prefix;
    5959  Message_queue_MP_Remote_operations operation;
    6060  Objects_Name                       name;
    61   rtems_option                    option_set;
     61  rtems_option                       option_set;
    6262  Objects_Id                         proxy_id;
    6363  unsigned32                         count;
     64  unsigned32                         size;
    6465  unsigned32                         pad0;
    65   unsigned32                         pad1;
    66   unsigned32                         pad2;
    6766  Message_queue_Buffer               Buffer;
    6867}   Message_queue_MP_Packet;
     
    9695  Message_queue_MP_Remote_operations  operation,
    9796  Objects_Id                          message_queue_id,
    98   Message_queue_Buffer               *buffer,
    99   rtems_option                     option_set,
    100   rtems_interval                   timeout
     97  void                               *buffer,
     98  unsigned32                         *size_p,
     99  rtems_option                        option_set,
     100  rtems_interval                      timeout
    101101);
    102102
  • cpukit/rtems/inline/rtems/rtems/attr.inl

    r3b438fa rb06e68ef  
    8585/*PAGE
    8686 *
    87  *  _Attributes_Is_limit
    88  *
    89  */
    90 
    91 STATIC INLINE boolean _Attributes_Is_limit(
    92   rtems_attribute attribute_set
    93 )
    94 {
    95    return ( attribute_set & RTEMS_LIMIT );
    96 }
    97 
    98 /*PAGE
    99  *
    10087 *  _Attributes_Is_binary_semaphore
    10188 *
  • cpukit/rtems/inline/rtems/rtems/message.inl

    r3b438fa rb06e68ef  
    1818#define __MESSAGE_QUEUE_inl
    1919
     20#include <rtems/wkspace.h>
     21
    2022/*PAGE
    2123 *
     
    2527
    2628STATIC INLINE void _Message_queue_Copy_buffer (
    27   Message_queue_Buffer *source,
    28   Message_queue_Buffer *destination
     29  void      *source,
     30  void      *destination,
     31  unsigned32 size
    2932)
    3033{
    31   *destination = *source;
     34  memcpy(destination, source, size);
    3235}
    3336
     
    3942
    4043STATIC INLINE Message_queue_Buffer_control *
    41   _Message_queue_Allocate_message_buffer ( void )
     44_Message_queue_Allocate_message_buffer (
     45    Message_queue_Control *the_message_queue
     46)
    4247{
    4348   return (Message_queue_Buffer_control *)
    44      _Chain_Get( &_Message_queue_Inactive_messages );
     49     _Chain_Get( &the_message_queue->Inactive_messages );
    4550}
    4651
     
    5257
    5358STATIC INLINE void _Message_queue_Free_message_buffer (
    54   Message_queue_Buffer_control *the_message
     59    Message_queue_Control        *the_message_queue,
     60    Message_queue_Buffer_control *the_message
    5561)
    5662{
    57  _Chain_Append( &_Message_queue_Inactive_messages, &the_message->Node );
     63  _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
    5864}
    5965
     
    117123}
    118124
    119 /*PAGE
    120  *
    121  *  _Message_queue_Allocate
    122  *
    123  */
    124 
    125 STATIC INLINE Message_queue_Control *_Message_queue_Allocate ( void )
    126 {
    127   return (Message_queue_Control *)
    128      _Objects_Allocate( &_Message_queue_Information );
    129 }
    130125
    131126/*PAGE
     
    139134)
    140135{
     136  if (the_message_queue->message_buffers)
     137  {
     138      _Workspace_Free((void *) the_message_queue->message_buffers);
     139      the_message_queue->message_buffers = 0;
     140  }
     141 
    141142  _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
    142143}
  • cpukit/rtems/macros/rtems/rtems/attr.inl

    r3b438fa rb06e68ef  
    6363/*PAGE
    6464 *
    65  *  _Attributes_Is_limit
    66  *
    67  */
    68 
    69 #define _Attributes_Is_limit( _attribute_set ) \
    70   ( (_attribute_set) & RTEMS_LIMIT )
    71 
    72 /*PAGE
    73  *
    7465 *  _Attributes_Is_binary_semaphore
    7566 *
Note: See TracChangeset for help on using the changeset viewer.