Changeset 3652ad35 in rtems


Ignore:
Timestamp:
09/19/95 14:53:29 (28 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
38ffa0c
Parents:
b3ac6a8d
Message:

Minor bug fixes to get all targets compilable and running. The
single biggest changes were the expansion of the workspace size
macro to include other types of objects and the increase in the
minimum stack size for most CPUs.

Files:
11 added
217 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/rtems/headers/message.h

    rb3ac6a8d r3652ad35  
    4040#include <rtems/rtems/attr.h>
    4141#include <rtems/core/threadq.h>
    42 
    43 /*
    44  *  The following defines the data types needed to manipulate
    45  *  the contents of message buffers.
    46  *  Since msgs are variable length we just make a ptr to 1.
    47  */
    48 
    49 typedef struct {
    50     unsigned32  size;
    51 
    52 #ifndef __cplusplus
    53                                /* NOTE:   [0] is gcc specific,
    54                                 *   but specifically disallowed by ANSI STD C++
    55                                 * g++ warns about it, so we #ifdef it out to
    56                                 * get rid of warnings when compiled by g++.
    57                                 */
    58     unsigned32  buffer[0];
    59 #endif
    60 
    61 } Message_queue_Buffer;
    62 
    63 /*
    64  *  The following records define the organization of a message
    65  *  buffer.
    66  */
    67 
    68 typedef struct {
    69   Chain_Node           Node;
    70   Message_queue_Buffer Contents;
    71 }   Message_queue_Buffer_control;
    72 
    73 /*
    74  *  The following records define the control block used to manage
    75  *  each message queue.
    76  */
    77 
    78 typedef struct {
    79   Objects_Control      Object;
    80   Thread_queue_Control Wait_queue;
    81   rtems_attribute      attribute_set;
    82   unsigned32           maximum_pending_messages;
    83   unsigned32           number_of_pending_messages;
    84   unsigned32           maximum_message_size;
    85   Chain_Control        Pending_messages;
    86   Message_queue_Buffer *message_buffers;
    87   Chain_Control        Inactive_messages;
    88 }   Message_queue_Control;
    89 
    90 /*
    91  *  The following defines the information control block used to
    92  *  manage this class of objects.
    93  */
    94 
    95 EXTERN Objects_Information  _Message_queue_Information;
     42#include <rtems/core/coremsg.h>
    9643
    9744/*
     
    10047 *  in a send or urgent fashion.
    10148 */
    102 
     49 
    10350typedef enum {
    10451  MESSAGE_QUEUE_SEND_REQUEST   = 0,
    10552  MESSAGE_QUEUE_URGENT_REQUEST = 1
    10653}  Message_queue_Submit_types;
     54
     55/*
     56 *  The following records define the control block used to manage
     57 *  each message queue.
     58 */
     59
     60typedef struct {
     61  Objects_Control             Object;
     62  rtems_attribute             attribute_set;
     63  CORE_message_queue_Control  message_queue;
     64}   Message_queue_Control;
     65
     66/*
     67 *  The following defines the information control block used to
     68 *  manage this class of objects.
     69 */
     70
     71EXTERN Objects_Information  _Message_queue_Information;
    10772
    10873/*
     
    256221  Objects_Id            id,
    257222  void                 *buffer,
    258   unsigned32           *size_p,
     223  unsigned32           *size,
    259224  unsigned32            option_set,
    260225  rtems_interval        timeout
     
    278243
    279244/*
    280  *  _Message_queue_Copy_buffer
    281  *
    282  *  DESCRIPTION:
    283  *
    284  *  This routine copies the contents of the source message buffer
    285  *  to the destination message buffer.
    286  */
    287 
    288 STATIC INLINE void _Message_queue_Copy_buffer (
    289   void      *source,
    290   void      *destination,
    291   unsigned32 size
    292 );
    293 
    294 /*
    295  *  _Message_queue_Seize
    296  *
    297  *  DESCRIPTION:
    298  *
    299  *  This routine attempts to receive a message from the_message_queue.
    300  *  If a message is available or if the RTEMS_NO_WAIT option is enabled in
    301  *  option_set, then the routine returns.  Otherwise, the calling task
    302  *  is blocked until a message is available.  If a message is returned
    303  *  to the task, then buffer will contain its contents.
    304  */
    305 
    306 boolean _Message_queue_Seize(
    307   Message_queue_Control *the_message_queue,
    308   unsigned32             option_set,
    309   void                  *buffer,
    310   unsigned32            *size_p
    311 );
    312 
    313 /*
    314  *  _Message_queue_Flush_support
    315  *
    316  *  DESCRIPTION:
    317  *
    318  *  This routine flushes all outstanding messages and returns
    319  *  them to the inactive message chain.
    320  */
    321 
    322 unsigned32 _Message_queue_Flush_support(
    323   Message_queue_Control *the_message_queue
    324 );
    325 
    326 /*
    327245 *  _Message_queue_Submit
    328246 *
    329247 *  DESCRIPTION:
    330248 *
    331  *  This routine provides the common foundation for the
    332  *  rtems_message_queue_send and rtems_message_queue_urgent directives.
    333  */
    334 
     249 *  This routine implements the directives rtems_message_queue_send
     250 *  and rtems_message_queue_urgent.  It processes a message that is
     251 *  to be submitted to the designated message queue.  The message will
     252 *  either be processed as a send send message which it will be inserted
     253 *  at the rear of the queue or it will be processed as an urgent message
     254 *  which will be inserted at the front of the queue.
     255 */
     256 
    335257rtems_status_code _Message_queue_Submit(
    336258  Objects_Id                  id,
     
    338260  unsigned32                  size,
    339261  Message_queue_Submit_types  submit_type
    340 );
    341 
    342 /*
    343  *  _Message_queue_Allocate_message_buffer
    344  *
    345  *  DESCRIPTION:
    346  *
    347  *  This function allocates a message buffer from the inactive
    348  *  message buffer chain.
    349  */
    350 
    351 STATIC INLINE Message_queue_Buffer_control *
    352   _Message_queue_Allocate_message_buffer (
    353    Message_queue_Control *the_message_queue
    354 );
    355 
    356 /*
    357  *  _Message_queue_Free_message_buffer
    358  *
    359  *  DESCRIPTION:
    360  *
    361  *  This routine frees a message buffer to the inactive
    362  *  message buffer chain.
    363  */
    364 
    365 STATIC INLINE void _Message_queue_Free_message_buffer (
    366   Message_queue_Control        *the_message_queue,
    367   Message_queue_Buffer_control *the_message
    368 );
    369 
    370 /*
    371  *  _Message_queue_Get_pending_message
    372  *
    373  *  DESCRIPTION:
    374  *
    375  *  This function removes the first message from the_message_queue
    376  *  and returns a pointer to it.
    377  */
    378 
    379 STATIC INLINE
    380   Message_queue_Buffer_control *_Message_queue_Get_pending_message (
    381   Message_queue_Control *the_message_queue
    382 );
    383 
    384 /*
    385  *  _Message_queue_Append
    386  *
    387  *  DESCRIPTION:
    388  *
    389  *  This routine places the_message at the rear of the outstanding
    390  *  messages on the_message_queue.
    391  */
    392 
    393 STATIC INLINE void _Message_queue_Append (
    394   Message_queue_Control        *the_message_queue,
    395   Message_queue_Buffer_control *the_message
    396 );
    397 
    398 /*
    399  *  _Message_queue_Prepend
    400  *
    401  *  DESCRIPTION:
    402  *
    403  *  This routine places the_message at the rear of the outstanding
    404  *  messages on the_message_queue.
    405  */
    406 
    407 STATIC INLINE void _Message_queue_Prepend (
    408   Message_queue_Control        *the_message_queue,
    409   Message_queue_Buffer_control *the_message
    410262);
    411263
     
    470322);
    471323
     324/*
     325 *  _Message_queue_Translate_core_message_queue_return_code
     326 *
     327 *  DESCRIPTION:
     328 *
     329 *  This function returns a RTEMS status code based on the core message queue
     330 *  status code specified.
     331 */
     332 
     333rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
     334  unsigned32 the_message_queue_status
     335);
     336
     337/*
     338 *
     339 *  _Message_queue_Core_message_queue_mp_support
     340 *
     341 *  Input parameters:
     342 *    the_thread - the remote thread the message was submitted to
     343 *    id         - id of the message queue
     344 *
     345 *  Output parameters: NONE
     346 */
     347 
     348void  _Message_queue_Core_message_queue_mp_support (
     349  Thread_Control *the_thread,
     350  Objects_Id      id
     351);
     352
    472353#include <rtems/rtems/message.inl>
    473354#include <rtems/rtems/msgmp.h>
  • c/src/exec/rtems/headers/msgmp.h

    rb3ac6a8d r3652ad35  
    6464  unsigned32                         size;
    6565  unsigned32                         pad0;
    66   Message_queue_Buffer               Buffer;
     66  CORE_message_queue_Buffer          Buffer;
    6767}   Message_queue_MP_Packet;
    6868
  • c/src/exec/rtems/include/rtems/rtems/message.h

    rb3ac6a8d r3652ad35  
    4040#include <rtems/rtems/attr.h>
    4141#include <rtems/core/threadq.h>
    42 
    43 /*
    44  *  The following defines the data types needed to manipulate
    45  *  the contents of message buffers.
    46  *  Since msgs are variable length we just make a ptr to 1.
    47  */
    48 
    49 typedef struct {
    50     unsigned32  size;
    51 
    52 #ifndef __cplusplus
    53                                /* NOTE:   [0] is gcc specific,
    54                                 *   but specifically disallowed by ANSI STD C++
    55                                 * g++ warns about it, so we #ifdef it out to
    56                                 * get rid of warnings when compiled by g++.
    57                                 */
    58     unsigned32  buffer[0];
    59 #endif
    60 
    61 } Message_queue_Buffer;
    62 
    63 /*
    64  *  The following records define the organization of a message
    65  *  buffer.
    66  */
    67 
    68 typedef struct {
    69   Chain_Node           Node;
    70   Message_queue_Buffer Contents;
    71 }   Message_queue_Buffer_control;
    72 
    73 /*
    74  *  The following records define the control block used to manage
    75  *  each message queue.
    76  */
    77 
    78 typedef struct {
    79   Objects_Control      Object;
    80   Thread_queue_Control Wait_queue;
    81   rtems_attribute      attribute_set;
    82   unsigned32           maximum_pending_messages;
    83   unsigned32           number_of_pending_messages;
    84   unsigned32           maximum_message_size;
    85   Chain_Control        Pending_messages;
    86   Message_queue_Buffer *message_buffers;
    87   Chain_Control        Inactive_messages;
    88 }   Message_queue_Control;
    89 
    90 /*
    91  *  The following defines the information control block used to
    92  *  manage this class of objects.
    93  */
    94 
    95 EXTERN Objects_Information  _Message_queue_Information;
     42#include <rtems/core/coremsg.h>
    9643
    9744/*
     
    10047 *  in a send or urgent fashion.
    10148 */
    102 
     49 
    10350typedef enum {
    10451  MESSAGE_QUEUE_SEND_REQUEST   = 0,
    10552  MESSAGE_QUEUE_URGENT_REQUEST = 1
    10653}  Message_queue_Submit_types;
     54
     55/*
     56 *  The following records define the control block used to manage
     57 *  each message queue.
     58 */
     59
     60typedef struct {
     61  Objects_Control             Object;
     62  rtems_attribute             attribute_set;
     63  CORE_message_queue_Control  message_queue;
     64}   Message_queue_Control;
     65
     66/*
     67 *  The following defines the information control block used to
     68 *  manage this class of objects.
     69 */
     70
     71EXTERN Objects_Information  _Message_queue_Information;
    10772
    10873/*
     
    256221  Objects_Id            id,
    257222  void                 *buffer,
    258   unsigned32           *size_p,
     223  unsigned32           *size,
    259224  unsigned32            option_set,
    260225  rtems_interval        timeout
     
    278243
    279244/*
    280  *  _Message_queue_Copy_buffer
    281  *
    282  *  DESCRIPTION:
    283  *
    284  *  This routine copies the contents of the source message buffer
    285  *  to the destination message buffer.
    286  */
    287 
    288 STATIC INLINE void _Message_queue_Copy_buffer (
    289   void      *source,
    290   void      *destination,
    291   unsigned32 size
    292 );
    293 
    294 /*
    295  *  _Message_queue_Seize
    296  *
    297  *  DESCRIPTION:
    298  *
    299  *  This routine attempts to receive a message from the_message_queue.
    300  *  If a message is available or if the RTEMS_NO_WAIT option is enabled in
    301  *  option_set, then the routine returns.  Otherwise, the calling task
    302  *  is blocked until a message is available.  If a message is returned
    303  *  to the task, then buffer will contain its contents.
    304  */
    305 
    306 boolean _Message_queue_Seize(
    307   Message_queue_Control *the_message_queue,
    308   unsigned32             option_set,
    309   void                  *buffer,
    310   unsigned32            *size_p
    311 );
    312 
    313 /*
    314  *  _Message_queue_Flush_support
    315  *
    316  *  DESCRIPTION:
    317  *
    318  *  This routine flushes all outstanding messages and returns
    319  *  them to the inactive message chain.
    320  */
    321 
    322 unsigned32 _Message_queue_Flush_support(
    323   Message_queue_Control *the_message_queue
    324 );
    325 
    326 /*
    327245 *  _Message_queue_Submit
    328246 *
    329247 *  DESCRIPTION:
    330248 *
    331  *  This routine provides the common foundation for the
    332  *  rtems_message_queue_send and rtems_message_queue_urgent directives.
    333  */
    334 
     249 *  This routine implements the directives rtems_message_queue_send
     250 *  and rtems_message_queue_urgent.  It processes a message that is
     251 *  to be submitted to the designated message queue.  The message will
     252 *  either be processed as a send send message which it will be inserted
     253 *  at the rear of the queue or it will be processed as an urgent message
     254 *  which will be inserted at the front of the queue.
     255 */
     256 
    335257rtems_status_code _Message_queue_Submit(
    336258  Objects_Id                  id,
     
    338260  unsigned32                  size,
    339261  Message_queue_Submit_types  submit_type
    340 );
    341 
    342 /*
    343  *  _Message_queue_Allocate_message_buffer
    344  *
    345  *  DESCRIPTION:
    346  *
    347  *  This function allocates a message buffer from the inactive
    348  *  message buffer chain.
    349  */
    350 
    351 STATIC INLINE Message_queue_Buffer_control *
    352   _Message_queue_Allocate_message_buffer (
    353    Message_queue_Control *the_message_queue
    354 );
    355 
    356 /*
    357  *  _Message_queue_Free_message_buffer
    358  *
    359  *  DESCRIPTION:
    360  *
    361  *  This routine frees a message buffer to the inactive
    362  *  message buffer chain.
    363  */
    364 
    365 STATIC INLINE void _Message_queue_Free_message_buffer (
    366   Message_queue_Control        *the_message_queue,
    367   Message_queue_Buffer_control *the_message
    368 );
    369 
    370 /*
    371  *  _Message_queue_Get_pending_message
    372  *
    373  *  DESCRIPTION:
    374  *
    375  *  This function removes the first message from the_message_queue
    376  *  and returns a pointer to it.
    377  */
    378 
    379 STATIC INLINE
    380   Message_queue_Buffer_control *_Message_queue_Get_pending_message (
    381   Message_queue_Control *the_message_queue
    382 );
    383 
    384 /*
    385  *  _Message_queue_Append
    386  *
    387  *  DESCRIPTION:
    388  *
    389  *  This routine places the_message at the rear of the outstanding
    390  *  messages on the_message_queue.
    391  */
    392 
    393 STATIC INLINE void _Message_queue_Append (
    394   Message_queue_Control        *the_message_queue,
    395   Message_queue_Buffer_control *the_message
    396 );
    397 
    398 /*
    399  *  _Message_queue_Prepend
    400  *
    401  *  DESCRIPTION:
    402  *
    403  *  This routine places the_message at the rear of the outstanding
    404  *  messages on the_message_queue.
    405  */
    406 
    407 STATIC INLINE void _Message_queue_Prepend (
    408   Message_queue_Control        *the_message_queue,
    409   Message_queue_Buffer_control *the_message
    410262);
    411263
     
    470322);
    471323
     324/*
     325 *  _Message_queue_Translate_core_message_queue_return_code
     326 *
     327 *  DESCRIPTION:
     328 *
     329 *  This function returns a RTEMS status code based on the core message queue
     330 *  status code specified.
     331 */
     332 
     333rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
     334  unsigned32 the_message_queue_status
     335);
     336
     337/*
     338 *
     339 *  _Message_queue_Core_message_queue_mp_support
     340 *
     341 *  Input parameters:
     342 *    the_thread - the remote thread the message was submitted to
     343 *    id         - id of the message queue
     344 *
     345 *  Output parameters: NONE
     346 */
     347 
     348void  _Message_queue_Core_message_queue_mp_support (
     349  Thread_Control *the_thread,
     350  Objects_Id      id
     351);
     352
    472353#include <rtems/rtems/message.inl>
    473354#include <rtems/rtems/msgmp.h>
  • c/src/exec/rtems/include/rtems/rtems/msgmp.h

    rb3ac6a8d r3652ad35  
    6464  unsigned32                         size;
    6565  unsigned32                         pad0;
    66   Message_queue_Buffer               Buffer;
     66  CORE_message_queue_Buffer          Buffer;
    6767}   Message_queue_MP_Packet;
    6868
  • c/src/exec/rtems/inline/message.inl

    rb3ac6a8d r3652ad35  
    1919
    2020#include <rtems/core/wkspace.h>
    21 
    22 /*PAGE
    23  *
    24  *  _Message_queue_Copy_buffer
    25  *
    26  */
    27 
    28 STATIC INLINE void _Message_queue_Copy_buffer (
    29   void      *source,
    30   void      *destination,
    31   unsigned32 size
    32 )
    33 {
    34   memcpy(destination, source, size);
    35 }
    36 
    37 /*PAGE
    38  *
    39  *  _Message_queue_Allocate_message_buffer
    40  *
    41  */
    42 
    43 STATIC INLINE Message_queue_Buffer_control *
    44 _Message_queue_Allocate_message_buffer (
    45     Message_queue_Control *the_message_queue
    46 )
    47 {
    48    return (Message_queue_Buffer_control *)
    49      _Chain_Get( &the_message_queue->Inactive_messages );
    50 }
    51 
    52 /*PAGE
    53  *
    54  *  _Message_queue_Free_message_buffer
    55  *
    56  */
    57 
    58 STATIC INLINE void _Message_queue_Free_message_buffer (
    59     Message_queue_Control        *the_message_queue,
    60     Message_queue_Buffer_control *the_message
    61 )
    62 {
    63   _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
    64 }
    65 
    66 /*PAGE
    67  *
    68  *  _Message_queue_Get_pending_message
    69  *
    70  */
    71 
    72 STATIC INLINE
    73   Message_queue_Buffer_control *_Message_queue_Get_pending_message (
    74   Message_queue_Control *the_message_queue
    75 )
    76 {
    77   return (Message_queue_Buffer_control *)
    78     _Chain_Get_unprotected( &the_message_queue->Pending_messages );
    79 }
    80 
    81 /*PAGE
    82  *
    83  *  _Message_queue_Append
    84  *
    85  */
    86 
    87 STATIC INLINE void _Message_queue_Append (
    88   Message_queue_Control        *the_message_queue,
    89   Message_queue_Buffer_control *the_message
    90 )
    91 {
    92   _Chain_Append( &the_message_queue->Pending_messages, &the_message->Node );
    93 }
    94 
    95 /*PAGE
    96  *
    97  *  _Message_queue_Prepend
    98  *
    99  */
    100 
    101 STATIC INLINE void _Message_queue_Prepend (
    102   Message_queue_Control        *the_message_queue,
    103   Message_queue_Buffer_control *the_message
    104 )
    105 {
    106   _Chain_Prepend(
    107     &the_message_queue->Pending_messages,
    108     &the_message->Node
    109   );
    110 }
    11121
    11222/*PAGE
     
    13444)
    13545{
    136   if (the_message_queue->message_buffers) {
    137     _Workspace_Free((void *) the_message_queue->message_buffers);
    138     the_message_queue->message_buffers = 0;
    139   }
    140  
    14146  _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
    14247}
  • c/src/exec/rtems/inline/rtems/rtems/message.inl

    rb3ac6a8d r3652ad35  
    1919
    2020#include <rtems/core/wkspace.h>
    21 
    22 /*PAGE
    23  *
    24  *  _Message_queue_Copy_buffer
    25  *
    26  */
    27 
    28 STATIC INLINE void _Message_queue_Copy_buffer (
    29   void      *source,
    30   void      *destination,
    31   unsigned32 size
    32 )
    33 {
    34   memcpy(destination, source, size);
    35 }
    36 
    37 /*PAGE
    38  *
    39  *  _Message_queue_Allocate_message_buffer
    40  *
    41  */
    42 
    43 STATIC INLINE Message_queue_Buffer_control *
    44 _Message_queue_Allocate_message_buffer (
    45     Message_queue_Control *the_message_queue
    46 )
    47 {
    48    return (Message_queue_Buffer_control *)
    49      _Chain_Get( &the_message_queue->Inactive_messages );
    50 }
    51 
    52 /*PAGE
    53  *
    54  *  _Message_queue_Free_message_buffer
    55  *
    56  */
    57 
    58 STATIC INLINE void _Message_queue_Free_message_buffer (
    59     Message_queue_Control        *the_message_queue,
    60     Message_queue_Buffer_control *the_message
    61 )
    62 {
    63   _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
    64 }
    65 
    66 /*PAGE
    67  *
    68  *  _Message_queue_Get_pending_message
    69  *
    70  */
    71 
    72 STATIC INLINE
    73   Message_queue_Buffer_control *_Message_queue_Get_pending_message (
    74   Message_queue_Control *the_message_queue
    75 )
    76 {
    77   return (Message_queue_Buffer_control *)
    78     _Chain_Get_unprotected( &the_message_queue->Pending_messages );
    79 }
    80 
    81 /*PAGE
    82  *
    83  *  _Message_queue_Append
    84  *
    85  */
    86 
    87 STATIC INLINE void _Message_queue_Append (
    88   Message_queue_Control        *the_message_queue,
    89   Message_queue_Buffer_control *the_message
    90 )
    91 {
    92   _Chain_Append( &the_message_queue->Pending_messages, &the_message->Node );
    93 }
    94 
    95 /*PAGE
    96  *
    97  *  _Message_queue_Prepend
    98  *
    99  */
    100 
    101 STATIC INLINE void _Message_queue_Prepend (
    102   Message_queue_Control        *the_message_queue,
    103   Message_queue_Buffer_control *the_message
    104 )
    105 {
    106   _Chain_Prepend(
    107     &the_message_queue->Pending_messages,
    108     &the_message->Node
    109   );
    110 }
    11121
    11222/*PAGE
     
    13444)
    13545{
    136   if (the_message_queue->message_buffers) {
    137     _Workspace_Free((void *) the_message_queue->message_buffers);
    138     the_message_queue->message_buffers = 0;
    139   }
    140  
    14146  _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
    14247}
  • c/src/exec/rtems/macros/message.inl

    rb3ac6a8d r3652ad35  
    2020/*PAGE
    2121 *
    22  *  _Message_queue_Copy_buffer
    23  */
    24 
    25 #define _Message_queue_Copy_buffer( _source, _destination, _size ) \
    26   memcpy( _destination, _source, _size)
    27 
    28 /*PAGE
    29  *
    30  *  _Message_queue_Allocate_message_buffer
    31  *
    32  */
    33 
    34 #define _Message_queue_Allocate_message_buffer( _the_message_queue ) \
    35   (Message_queue_Buffer_control *) \
    36     _Chain_Get( &(_the_message_queue)->Inactive_messages )
    37 
    38 /*PAGE
    39  *
    40  *  _Message_queue_Free_message_buffer
    41  *
    42  */
    43 
    44 #define _Message_queue_Free_message_buffer( _the_message_queue, _the_message ) \
    45   _Chain_Append( \
    46     &(_the_message_queue)->Inactive_messages, \
    47     &(_the_message)->Node \
    48   )
    49 
    50 /*PAGE
    51  *
    52  *  _Message_queue_Get_pending_message
    53  *
    54  */
    55 
    56 #define _Message_queue_Get_pending_message( _the_message_queue ) \
    57    (Message_queue_Buffer_control *) \
    58      _Chain_Get_unprotected( &(_the_message_queue)->Pending_messages )
    59 
    60 /*PAGE
    61  *
    62  *  _Message_queue_Append
    63  *
    64  */
    65 
    66 #define _Message_queue_Append( _the_message_queue, _the_message ) \
    67    _Chain_Append( &(_the_message_queue)->Pending_messages, \
    68                   &(_the_message)->Node )
    69 
    70 /*PAGE
    71  *
    72  *  _Message_queue_Prepend
    73  *
    74  */
    75 
    76 #define _Message_queue_Prepend( _the_message_queue, _the_message ) \
    77    _Chain_Prepend( &(_the_message_queue)->Pending_messages, \
    78                    &(_the_message)->Node )
    79 
    80 /*PAGE
    81  *
    8222 *  _Message_queue_Is_null
    8323 *
     
    9434
    9535#define _Message_queue_Free( _the_message_queue ) \
    96   do { \
    97     \
    98     if ( (_the_message_queue)->message_buffers ) { \
    99       _Workspace_Free((void *) (_the_message_queue)->message_buffers); \
    100       (_the_message_queue)->message_buffers = 0; \
    101     } \
    102     \
    103     _Objects_Free( \
    104       &_Message_queue_Information, \
    105       &(_the_message_queue)->Object \
    106     ); \
    107   } while ( 0 )
    108 
     36  _Objects_Free( &_Message_queue_Information, &(_the_message_queue)->Object )
    10937
    11038/*PAGE
  • c/src/exec/rtems/macros/rtems/rtems/message.inl

    rb3ac6a8d r3652ad35  
    2020/*PAGE
    2121 *
    22  *  _Message_queue_Copy_buffer
    23  */
    24 
    25 #define _Message_queue_Copy_buffer( _source, _destination, _size ) \
    26   memcpy( _destination, _source, _size)
    27 
    28 /*PAGE
    29  *
    30  *  _Message_queue_Allocate_message_buffer
    31  *
    32  */
    33 
    34 #define _Message_queue_Allocate_message_buffer( _the_message_queue ) \
    35   (Message_queue_Buffer_control *) \
    36     _Chain_Get( &(_the_message_queue)->Inactive_messages )
    37 
    38 /*PAGE
    39  *
    40  *  _Message_queue_Free_message_buffer
    41  *
    42  */
    43 
    44 #define _Message_queue_Free_message_buffer( _the_message_queue, _the_message ) \
    45   _Chain_Append( \
    46     &(_the_message_queue)->Inactive_messages, \
    47     &(_the_message)->Node \
    48   )
    49 
    50 /*PAGE
    51  *
    52  *  _Message_queue_Get_pending_message
    53  *
    54  */
    55 
    56 #define _Message_queue_Get_pending_message( _the_message_queue ) \
    57    (Message_queue_Buffer_control *) \
    58      _Chain_Get_unprotected( &(_the_message_queue)->Pending_messages )
    59 
    60 /*PAGE
    61  *
    62  *  _Message_queue_Append
    63  *
    64  */
    65 
    66 #define _Message_queue_Append( _the_message_queue, _the_message ) \
    67    _Chain_Append( &(_the_message_queue)->Pending_messages, \
    68                   &(_the_message)->Node )
    69 
    70 /*PAGE
    71  *
    72  *  _Message_queue_Prepend
    73  *
    74  */
    75 
    76 #define _Message_queue_Prepend( _the_message_queue, _the_message ) \
    77    _Chain_Prepend( &(_the_message_queue)->Pending_messages, \
    78                    &(_the_message)->Node )
    79 
    80 /*PAGE
    81  *
    8222 *  _Message_queue_Is_null
    8323 *
     
    9434
    9535#define _Message_queue_Free( _the_message_queue ) \
    96   do { \
    97     \
    98     if ( (_the_message_queue)->message_buffers ) { \
    99       _Workspace_Free((void *) (_the_message_queue)->message_buffers); \
    100       (_the_message_queue)->message_buffers = 0; \
    101     } \
    102     \
    103     _Objects_Free( \
    104       &_Message_queue_Information, \
    105       &(_the_message_queue)->Object \
    106     ); \
    107   } while ( 0 )
    108 
     36  _Objects_Free( &_Message_queue_Information, &(_the_message_queue)->Object )
    10937
    11038/*PAGE
  • c/src/exec/rtems/src/msg.c

    rb3ac6a8d r3652ad35  
    1515
    1616#include <rtems/system.h>
    17 #include <rtems/rtems/status.h>
    18 #include <rtems/rtems/attr.h>
     17#include <rtems/sysstate.h>
    1918#include <rtems/core/chain.h>
    2019#include <rtems/core/isr.h>
    21 #include <rtems/rtems/message.h>
     20#include <rtems/core/coremsg.h>
    2221#include <rtems/core/object.h>
    23 #include <rtems/rtems/options.h>
    2422#include <rtems/core/states.h>
    25 #include <rtems/rtems/support.h>
    2623#include <rtems/core/thread.h>
    2724#include <rtems/core/wkspace.h>
    2825#include <rtems/core/mpci.h>
    29 #include <rtems/sysstate.h>
     26#include <rtems/rtems/status.h>
     27#include <rtems/rtems/attr.h>
     28#include <rtems/rtems/message.h>
     29#include <rtems/rtems/options.h>
     30#include <rtems/rtems/support.h>
    3031
    3132/*PAGE
     
    7374 *
    7475 *  Allocate a message queue and the space for its messages
     76 *
     77 *  Input parameters:
     78 *    the_message_queue - the message queue to allocate message buffers
     79 *    count             - maximum message and reserved buffer count
     80 *    max_message_size  - maximum size of each message
     81 *
     82 *  Output parameters:
     83 *    the_message_queue - set if successful, NULL otherwise
    7584 */
    7685
    7786Message_queue_Control *_Message_queue_Allocate (
    78   unsigned32          count,
    79   unsigned32          max_message_size
    80 )
    81 {
    82     Message_queue_Control *mq = 0;
    83     unsigned32 message_buffering_required;
    84     unsigned32 allocated_message_size;
    85 
    86     mq =
    87       (Message_queue_Control *)_Objects_Allocate(&_Message_queue_Information);
    88 
    89     if (mq == 0)
    90         goto failed;
    91 
    92     mq->maximum_message_size = max_message_size;
    93 
    94     /*
    95      * round size up to multiple of a ptr for chain init
    96      */
    97    
    98     allocated_message_size = max_message_size;
    99     if (allocated_message_size & (sizeof(unsigned32) - 1)) {
    100         allocated_message_size += sizeof(unsigned32);
    101         allocated_message_size &= ~(sizeof(unsigned32) - 1);
    102     }
    103    
    104     message_buffering_required =
    105       count * (allocated_message_size + sizeof(Message_queue_Buffer_control));
    106  
    107     mq->message_buffers =
    108       (Message_queue_Buffer *) _Workspace_Allocate(message_buffering_required);
    109 
    110     if (mq->message_buffers == 0)
    111         goto failed;
    112  
    113     _Chain_Initialize
    114       (&mq->Inactive_messages,
    115       mq->message_buffers,
    116       count,
    117       allocated_message_size + sizeof(Message_queue_Buffer_control)
    118     );
    119     return mq;
    120 
    121 failed:
    122     if (mq)
    123         _Message_queue_Free(mq);
    124     return (Message_queue_Control *) 0;
     87  unsigned32           count,
     88  unsigned32           max_message_size
     89)
     90{
     91  return
     92    (Message_queue_Control *)_Objects_Allocate(&_Message_queue_Information);
     93
    12594}
    12695
     
    133102 *
    134103 *  Input parameters:
    135  *    name          - user defined queue name
    136  *    count         - maximum message and reserved buffer count
     104 *    name             - user defined queue name
     105 *    count            - maximum message and reserved buffer count
    137106 *    max_message_size - maximum size of each message
    138  *    attribute_set - process method
    139  *    id            - pointer to queue
     107 *    attribute_set    - process method
     108 *    id               - pointer to queue
    140109 *
    141110 *  Output parameters:
     
    154123{
    155124  register Message_queue_Control *the_message_queue;
     125  CORE_message_queue_Attributes   the_message_queue_attributes;
     126  boolean                         is_global;
    156127
    157128  if ( !rtems_is_name_valid( name ) )
    158129    return RTEMS_INVALID_NAME;
    159130
    160   if ( _Attributes_Is_global( attribute_set ) &&
     131  if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
    161132       !_System_state_Is_multiprocessing )
    162133    return RTEMS_MP_NOT_CONFIGURED;
     
    175146   */
    176147 
    177   if ( _Attributes_Is_global( attribute_set ) &&
    178        (_MPCI_table->maximum_packet_size < max_message_size))
    179   {
    180       return RTEMS_INVALID_SIZE;
    181   }
     148  if ( is_global && (_MPCI_table->maximum_packet_size < max_message_size) )
     149    return RTEMS_INVALID_SIZE;
     150
    182151#endif
    183152       
    184153  _Thread_Disable_dispatch();              /* protects object pointer */
    185154
    186   the_message_queue = _Message_queue_Allocate(count, max_message_size);
     155  the_message_queue = _Message_queue_Allocate( count, max_message_size );
    187156
    188157  if ( !the_message_queue ) {
     
    191160  }
    192161
    193   if ( _Attributes_Is_global( attribute_set ) &&
    194        !( _Objects_MP_Allocate_and_open( &_Message_queue_Information, name,
    195                             the_message_queue->Object.id, FALSE ) ) ) {
     162  if ( is_global &&
     163    !( _Objects_MP_Allocate_and_open( &_Message_queue_Information,
     164                              name, the_message_queue->Object.id, FALSE ) ) ) {
    196165    _Message_queue_Free( the_message_queue );
    197166    _Thread_Enable_dispatch();
     
    199168  }
    200169
    201   the_message_queue->maximum_pending_messages = count;
    202 
    203170  the_message_queue->attribute_set = attribute_set;
    204   the_message_queue->number_of_pending_messages = 0;
    205 
    206   _Chain_Initialize_empty( &the_message_queue->Pending_messages );
    207 
    208   _Thread_queue_Initialize(
    209     &the_message_queue->Wait_queue,
    210     OBJECTS_RTEMS_MESSAGE_QUEUES,
    211     _Attributes_Is_priority( attribute_set ) ?
    212        THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
    213     STATES_WAITING_FOR_MESSAGE,
    214     _Message_queue_MP_Send_extract_proxy,
    215     RTEMS_TIMEOUT
    216   );
     171
     172  if (_Attributes_Is_priority( attribute_set ) )
     173    the_message_queue_attributes.discipline =
     174                                      CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
     175  else
     176    the_message_queue_attributes.discipline =
     177                                      CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
     178
     179  if ( ! _CORE_message_queue_Initialize(
     180           &the_message_queue->message_queue,
     181           OBJECTS_RTEMS_MESSAGE_QUEUES,
     182           &the_message_queue_attributes,
     183           count,
     184           max_message_size,
     185           _Message_queue_MP_Send_extract_proxy ) ) {
     186    if ( is_global )
     187        _Objects_MP_Close(
     188          &_Message_queue_Information, the_message_queue->Object.id);
     189
     190    _Message_queue_Free( the_message_queue );
     191    _Thread_Enable_dispatch();
     192    return RTEMS_TOO_MANY;
     193  }
    217194
    218195  _Objects_Open(
     
    224201  *id = the_message_queue->Object.id;
    225202
    226   if ( _Attributes_Is_global( attribute_set ) )
     203  if ( is_global )
    227204    _Message_queue_MP_Send_process_packet(
    228205      MESSAGE_QUEUE_MP_ANNOUNCE_CREATE,
     
    305282                      &the_message_queue->Object );
    306283
    307       if ( the_message_queue->number_of_pending_messages != 0 )
    308         (void) _Message_queue_Flush_support( the_message_queue );
    309       else
    310         _Thread_queue_Flush(
    311           &the_message_queue->Wait_queue,
    312           _Message_queue_MP_Send_object_was_deleted,
    313           RTEMS_OBJECT_WAS_DELETED
    314         );
     284      _CORE_message_queue_Close(
     285        &the_message_queue->message_queue,
     286        _Message_queue_MP_Send_object_was_deleted,
     287        CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED
     288      );
    315289
    316290      _Message_queue_Free( the_message_queue );
     
    347321 *    id     - pointer to message queue
    348322 *    buffer - pointer to message buffer
     323 *    size   - size of message to sent urgently
    349324 *
    350325 *  Output parameters:
     
    359334)
    360335{
    361   return _Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_SEND_REQUEST);
     336  return( _Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_SEND_REQUEST) );
    362337}
    363338
     
    372347 *    id     - pointer to message queue
    373348 *    buffer - pointer to message buffer
     349 *    size   - size of message to sent urgently
    374350 *
    375351 *  Output parameters:
    376352 *    RTEMS_SUCCESSFUL - if successful
    377  *    error code - if unsuccessful
     353 *    error code       - if unsuccessful
    378354 */
    379355
     
    384360)
    385361{
    386   return _Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_URGENT_REQUEST);
     362  return(_Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_URGENT_REQUEST));
    387363}
    388364
     
    397373 *    id     - pointer to message queue
    398374 *    buffer - pointer to message buffer
     375 *    size   - size of message to broadcast
    399376 *    count  - pointer to area to store number of threads made ready
    400377 *
    401378 *  Output parameters:
    402379 *    count             - number of threads made ready
    403  *    RTEMS_SUCCESSFUL - if successful
     380 *    RTEMS_SUCCESSFUL  - if successful
    404381 *    error code        - if unsuccessful
    405382 */
     
    414391  register Message_queue_Control *the_message_queue;
    415392  Objects_Locations               location;
    416   Thread_Control                 *the_thread;
    417   unsigned32                      number_broadcasted;
     393  CORE_message_queue_Status       core_status;
    418394
    419395  the_message_queue = _Message_queue_Get( id, &location );
     
    435411
    436412    case OBJECTS_LOCAL:
    437     {
    438       Thread_Wait_information *waitp;
    439       unsigned32 constrained_size;
    440 
    441       number_broadcasted = 0;
    442       while ( (the_thread =
    443                  _Thread_queue_Dequeue(&the_message_queue->Wait_queue)) ) {
    444         waitp = &the_thread->Wait;
    445         number_broadcasted += 1;
    446 
    447         constrained_size = size;
    448         if (size > the_message_queue->maximum_message_size)
    449             constrained_size = the_message_queue->maximum_message_size;
    450 
    451         _Message_queue_Copy_buffer(buffer,
    452                                    waitp->return_argument,
    453                                    constrained_size);
    454 
    455         *(rtems_unsigned32 *)the_thread->Wait.return_argument_1 = size;
    456        
    457         if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
    458           the_thread->receive_packet->return_code = RTEMS_SUCCESSFUL;
    459 
    460           _Message_queue_MP_Send_response_packet(
    461             MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
    462             id,
    463             the_thread
    464           );
    465         }
    466       }
     413      core_status = _CORE_message_queue_Broadcast(
     414                      &the_message_queue->message_queue,
     415                      buffer,
     416                      size,
     417                      id,
     418                      _Message_queue_Core_message_queue_mp_support,
     419                      count
     420                    );
     421                     
    467422      _Thread_Enable_dispatch();
    468       *count = number_broadcasted;
    469       return RTEMS_SUCCESSFUL;
    470     }
    471 
    472     default:
    473       return RTEMS_INTERNAL_ERROR;
    474   }
     423      return
     424        _Message_queue_Translate_core_message_queue_return_code( core_status );
     425
     426  }
     427  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    475428}
    476429
     
    485438 *    id         - queue id
    486439 *    buffer     - pointer to message buffer
     440 *    size       - size of message receive
    487441 *    option_set - options on receive
    488442 *    timeout    - number of ticks to wait
     
    490444 *  Output parameters:
    491445 *    RTEMS_SUCCESSFUL - if successful
    492  *    error code        - if unsuccessful
     446 *    error code       - if unsuccessful
    493447 */
    494448
     
    496450  Objects_Id            id,
    497451  void                 *buffer,
    498   unsigned32           *size_p,
     452  unsigned32           *size,
    499453  unsigned32            option_set,
    500454  rtems_interval        timeout
     
    503457  register Message_queue_Control *the_message_queue;
    504458  Objects_Locations               location;
     459  boolean                         wait;
    505460
    506461  the_message_queue = _Message_queue_Get( id, &location );
     
    515470          id,
    516471          buffer,
    517           size_p,
     472          size,
    518473          option_set,
    519474          timeout
     
    521476
    522477    case OBJECTS_LOCAL:
    523       if ( ! _Message_queue_Seize(the_message_queue,
    524                                   option_set,
    525                                   buffer,
    526                                   size_p))
    527       {
    528         _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
    529       }
     478      if ( _Options_Is_no_wait( option_set ) )
     479        wait = FALSE;
     480      else
     481        wait = TRUE;
     482 
     483      _CORE_message_queue_Seize(
     484        &the_message_queue->message_queue,
     485        the_message_queue->Object.id,
     486        buffer,
     487        size,
     488        wait,
     489        timeout
     490      );
    530491      _Thread_Enable_dispatch();
    531       return _Thread_Executing->Wait.return_code;
     492      return( _Message_queue_Translate_core_message_queue_return_code(
     493                  _Thread_Executing->Wait.return_code ) );
     494
    532495  }
    533496
     
    573536          id,
    574537          0,                               /* buffer not used */
    575           0,                               /* size_p */
     538          0,                               /* size */
    576539          0,                               /* option_set not used */
    577540          MPCI_DEFAULT_TIMEOUT
     
    579542
    580543    case OBJECTS_LOCAL:
    581       if ( the_message_queue->number_of_pending_messages != 0 )
    582         *count = _Message_queue_Flush_support( the_message_queue );
    583       else
    584         *count = 0;
     544      *count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
    585545      _Thread_Enable_dispatch();
    586546      return RTEMS_SUCCESSFUL;
     
    592552/*PAGE
    593553 *
    594  *  _Message_queue_Seize
    595  *
    596  *  This kernel routine dequeues a message, copies the message buffer to
    597  *  a given destination buffer, and frees the message buffer to the
    598  *  inactive message pool.
    599  *
    600  *  Input parameters:
    601  *    the_message_queue - pointer to message queue
    602  *    option_set        - options on receive
    603  *    the_buffer        - pointer to message buffer to be filled
    604  *
    605  *  Output parameters:
    606  *    TRUE  - if message received or RTEMS_NO_WAIT and no message
    607  *    FALSE - if thread is to block
    608  *
    609  *  NOTE: Dependent on BUFFER_LENGTH
    610  *
    611  *  INTERRUPT LATENCY:
    612  *    available
    613  *    wait
    614  */
    615 
    616 boolean _Message_queue_Seize(
    617   Message_queue_Control  *the_message_queue,
    618   rtems_option            option_set,
    619   void                   *buffer,
    620   unsigned32             *size_p
    621 )
    622 {
    623   ISR_Level                     level;
    624   Message_queue_Buffer_control *the_message;
    625   Thread_Control               *executing;
    626 
    627   executing = _Thread_Executing;
    628   executing->Wait.return_code = RTEMS_SUCCESSFUL;
    629   _ISR_Disable( level );
    630   if ( the_message_queue->number_of_pending_messages != 0 ) {
    631     the_message_queue->number_of_pending_messages -= 1;
    632 
    633     the_message = _Message_queue_Get_pending_message( the_message_queue );
    634     _ISR_Enable( level );
    635     *size_p = the_message->Contents.size;
    636     _Message_queue_Copy_buffer( the_message->Contents.buffer, buffer, *size_p );
    637     _Message_queue_Free_message_buffer(the_message_queue, the_message );
    638     return( TRUE );
    639   }
    640 
    641   if ( _Options_Is_no_wait( option_set ) ) {
    642     _ISR_Enable( level );
    643     executing->Wait.return_code = RTEMS_UNSATISFIED;
    644     return( TRUE );
    645   }
    646 
    647   the_message_queue->Wait_queue.sync = TRUE;
    648   executing->Wait.queue              = &the_message_queue->Wait_queue;
    649   executing->Wait.id                 = the_message_queue->Object.id;
    650   executing->Wait.option             = option_set;
    651   executing->Wait.return_argument    = (void *)buffer;
    652   executing->Wait.return_argument_1  = (void *)size_p;
    653   _ISR_Enable( level );
    654   return FALSE;
    655 }
    656 
    657 /*PAGE
    658  *
    659  *  _Message_queue_Flush_support
    660  *
    661  *  This message manager routine removes all messages from a message queue
    662  *  and returns them to the inactive message pool.
    663  *
    664  *  Input parameters:
    665  *    the_message_queue - pointer to message queue
    666  *
    667  *  Output parameters:
    668  *    returns - number of messages placed on inactive chain
    669  *
    670  *  INTERRUPT LATENCY:
    671  *    only case
    672  */
    673 
    674 unsigned32 _Message_queue_Flush_support(
    675   Message_queue_Control *the_message_queue
    676 )
    677 {
    678   ISR_Level   level;
    679   Chain_Node *inactive_first;
    680   Chain_Node *message_queue_first;
    681   Chain_Node *message_queue_last;
    682   unsigned32  count;
    683 
    684   _ISR_Disable( level );
    685     inactive_first      = the_message_queue->Inactive_messages.first;
    686     message_queue_first = the_message_queue->Pending_messages.first;
    687     message_queue_last  = the_message_queue->Pending_messages.last;
    688 
    689     the_message_queue->Inactive_messages.first = message_queue_first;
    690     message_queue_last->next = inactive_first;
    691     inactive_first->previous = message_queue_last;
    692     message_queue_first->previous          =
    693                _Chain_Head( &the_message_queue->Inactive_messages );
    694 
    695     _Chain_Initialize_empty( &the_message_queue->Pending_messages );
    696 
    697     count = the_message_queue->number_of_pending_messages;
    698     the_message_queue->number_of_pending_messages = 0;
    699   _ISR_Enable( level );
    700   return count;
    701 }
    702 
    703 /*PAGE
    704  *
    705554 *  _Message_queue_Submit
    706555 *
    707  *  This routine implements the directives q_send and q_urgent.  It
    708  *  processes a message that is to be submitted to the designated
    709  *  message queue.  The message will either be processed as a send
    710  *  send message which it will be inserted at the rear of the queue
    711  *  or it will be processed as an urgent message which will be inserted
    712  *  at the front of the queue.
     556 *  This routine implements the directives rtems_message_queue_send
     557 *  and rtems_message_queue_urgent.  It processes a message that is
     558 *  to be submitted to the designated message queue.  The message will
     559 *  either be processed as a send send message which it will be inserted
     560 *  at the rear of the queue or it will be processed as an urgent message
     561 *  which will be inserted at the front of the queue.
    713562 *
    714563 *  Input parameters:
     
    730579)
    731580{
    732   register Message_queue_Control *the_message_queue;
    733   Objects_Locations               location;
    734   Thread_Control                 *the_thread;
    735   Message_queue_Buffer_control   *the_message;
     581  register Message_queue_Control  *the_message_queue;
     582  Objects_Locations                location;
     583  CORE_message_queue_Status        core_status;
    736584
    737585  the_message_queue = _Message_queue_Get( id, &location );
     
    767615
    768616    case OBJECTS_LOCAL:
    769       if (size > the_message_queue->maximum_message_size)
    770       {
    771           _Thread_Enable_dispatch();
    772           return RTEMS_INVALID_SIZE;
    773       }
    774 
    775       /*
    776        * Is there a thread currently waiting on this message queue?
    777        */
    778      
    779       the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
    780       if ( the_thread )
    781       {
    782         _Message_queue_Copy_buffer(
    783           buffer,
    784           the_thread->Wait.return_argument,
    785           size
    786         );
    787         *(rtems_unsigned32 *)the_thread->Wait.return_argument_1 = size;
    788        
    789         if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
    790           the_thread->receive_packet->return_code = RTEMS_SUCCESSFUL;
    791 
    792           _Message_queue_MP_Send_response_packet(
    793             MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
    794             id,
    795             the_thread
    796           );
    797 
    798         }
    799         _Thread_Enable_dispatch();
    800         return RTEMS_SUCCESSFUL;
    801       }
    802 
    803       /*
    804        * No one waiting on this one currently.
    805        * Allocate a message buffer and store it away
    806        */
    807 
    808       if ( the_message_queue->number_of_pending_messages ==
    809            the_message_queue->maximum_pending_messages ) {
    810         _Thread_Enable_dispatch();
    811         return RTEMS_TOO_MANY;
    812       }
    813 
    814       the_message = _Message_queue_Allocate_message_buffer(the_message_queue);
    815       if ( the_message == 0) {
    816         _Thread_Enable_dispatch();
    817         return RTEMS_UNSATISFIED;
    818       }
    819 
    820       _Message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size );
    821       the_message->Contents.size = size;
    822      
    823       the_message_queue->number_of_pending_messages += 1;
    824 
    825617      switch ( submit_type ) {
    826618        case MESSAGE_QUEUE_SEND_REQUEST:
    827           _Message_queue_Append( the_message_queue, the_message );
     619          core_status = _CORE_message_queue_Send(
     620                          &the_message_queue->message_queue,
     621                          buffer,
     622                          size,
     623                          id,
     624                          _Message_queue_Core_message_queue_mp_support
     625                        );
    828626          break;
    829627        case MESSAGE_QUEUE_URGENT_REQUEST:
    830           _Message_queue_Prepend( the_message_queue, the_message );
     628          core_status = _CORE_message_queue_Urgent(
     629                          &the_message_queue->message_queue,
     630                          buffer,
     631                          size,
     632                          id,
     633                          _Message_queue_Core_message_queue_mp_support
     634                        );
    831635          break;
     636        default:
     637          core_status = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
     638          return RTEMS_INTERNAL_ERROR;   /* should never get here */
    832639      }
    833640
    834641      _Thread_Enable_dispatch();
     642      return _Message_queue_Translate_core_message_queue_return_code(
     643                core_status );
     644         
     645  }
     646  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
     647}
     648
     649/*PAGE
     650 *
     651 *  _Message_queue_Translate_core_message_queue_return_code
     652 *
     653 *  Input parameters:
     654 *    the_message_queue_status - message_queue status code to translate
     655 *
     656 *  Output parameters:
     657 *    rtems status code - translated RTEMS status code
     658 *
     659 */
     660 
     661rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
     662  unsigned32 the_message_queue_status
     663)
     664{
     665  switch ( the_message_queue_status ) {
     666    case  CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL:
    835667      return RTEMS_SUCCESSFUL;
    836          
    837     default:
    838       return RTEMS_INTERNAL_ERROR;       /* And they were such nice boys, too! */
    839   }
    840 }
     668    case  CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE:
     669      return RTEMS_INVALID_SIZE;
     670    case  CORE_MESSAGE_QUEUE_STATUS_TOO_MANY:
     671      return RTEMS_TOO_MANY;
     672    case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED:
     673      return RTEMS_UNSATISFIED;
     674    case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT:
     675      return RTEMS_UNSATISFIED;
     676    case CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED:
     677      return RTEMS_OBJECT_WAS_DELETED;
     678    case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT:
     679      return RTEMS_TIMEOUT;
     680    case THREAD_STATUS_PROXY_BLOCKING:
     681      return THREAD_STATUS_PROXY_BLOCKING;
     682  }
     683  _Internal_error_Occurred(         /* XXX */
     684    INTERNAL_ERROR_RTEMS_API,
     685    TRUE,
     686    the_message_queue_status
     687  );
     688  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
     689}
     690
     691/*PAGE
     692 *
     693 *  _Message_queue_Core_message_queue_mp_support
     694 *
     695 *  Input parameters:
     696 *    the_thread - the remote thread the message was submitted to
     697 *    id         - id of the message queue
     698 *
     699 *  Output parameters: NONE
     700 */
     701 
     702void  _Message_queue_Core_message_queue_mp_support (
     703  Thread_Control *the_thread,
     704  Objects_Id      id
     705)
     706{
     707  the_thread->receive_packet->return_code = RTEMS_SUCCESSFUL;
     708 
     709  _Message_queue_MP_Send_response_packet(
     710    MESSAGE_QUEUE_MP_RECEIVE_RESPONSE,
     711    id,
     712    the_thread
     713  );
     714}
  • c/src/exec/rtems/src/msgmp.c

    rb3ac6a8d r3652ad35  
    134134      if (buffer) {
    135135          the_packet->Buffer.size = *size_p;
    136           _Message_queue_Copy_buffer(buffer,
    137                                      the_packet->Buffer.buffer,
    138                                      *size_p);
     136          _CORE_message_queue_Copy_buffer(
     137            buffer,
     138            the_packet->Buffer.buffer,
     139            *size_p
     140          );
    139141      }
    140142
     
    311313           the_packet->size;
    312314
    313         _Message_queue_Copy_buffer(
     315        _CORE_message_queue_Copy_buffer(
    314316          the_packet->Buffer.buffer,
    315317          the_thread->Wait.return_argument,
  • c/src/exec/rtems/src/sem.c

    rb3ac6a8d r3652ad35  
    117117
    118118  if ( !rtems_is_name_valid( name ) )
    119     return ( RTEMS_INVALID_NAME );
     119    return RTEMS_INVALID_NAME;
    120120
    121121  if ( _Attributes_Is_global( attribute_set ) ) {
    122122
    123123    if ( !_System_state_Is_multiprocessing )
    124       return( RTEMS_MP_NOT_CONFIGURED );
     124      return RTEMS_MP_NOT_CONFIGURED;
    125125
    126126    if ( _Attributes_Is_inherit_priority( attribute_set ) )
    127       return( RTEMS_NOT_DEFINED );
     127      return RTEMS_NOT_DEFINED;
    128128
    129129  } else if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
     
    131131    if ( ! ( _Attributes_Is_binary_semaphore( attribute_set ) &&
    132132             _Attributes_Is_priority( attribute_set ) ) )
    133       return( RTEMS_NOT_DEFINED );
     133      return RTEMS_NOT_DEFINED;
    134134
    135135  }
    136136
    137137  if ( _Attributes_Is_binary_semaphore( attribute_set ) && ( count > 1 ) )
    138     return( RTEMS_INVALID_NUMBER );
     138    return RTEMS_INVALID_NUMBER;
    139139
    140140  _Thread_Disable_dispatch();             /* prevents deletion */
     
    144144  if ( !the_semaphore ) {
    145145    _Thread_Enable_dispatch();
    146     return( RTEMS_TOO_MANY );
     146    return RTEMS_TOO_MANY;
    147147  }
    148148
     
    152152    _Semaphore_Free( the_semaphore );
    153153    _Thread_Enable_dispatch();
    154     return( RTEMS_TOO_MANY );
     154    return RTEMS_TOO_MANY;
    155155  }
    156156
     
    211211    );
    212212  _Thread_Enable_dispatch();
    213   return( RTEMS_SUCCESSFUL );
     213  return RTEMS_SUCCESSFUL;
    214214}
    215215
     
    271271  switch ( location ) {
    272272    case OBJECTS_ERROR:
    273       return( RTEMS_INVALID_ID );
     273      return RTEMS_INVALID_ID;
    274274    case OBJECTS_REMOTE:
    275275      _Thread_Dispatch();
    276       return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
     276      return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
    277277    case OBJECTS_LOCAL:
    278278      if ( _Attributes_Is_binary_semaphore( the_semaphore->attribute_set) ) {
    279279        if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) ) {
    280280          _Thread_Enable_dispatch();
    281           return( RTEMS_RESOURCE_IN_USE );
     281          return RTEMS_RESOURCE_IN_USE;
    282282        }
    283283        else
     
    311311      }
    312312      _Thread_Enable_dispatch();
    313       return( RTEMS_SUCCESSFUL );
    314   }
    315 
    316   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     313      return RTEMS_SUCCESSFUL;
     314  }
     315
     316  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    317317}
    318318
     
    346346  switch ( location ) {
    347347    case OBJECTS_ERROR:
    348       return( RTEMS_INVALID_ID );
     348      return RTEMS_INVALID_ID;
    349349    case OBJECTS_REMOTE:
    350350      return _Semaphore_MP_Send_request_packet(
     
    368368        );
    369369        _Thread_Enable_dispatch();
    370         return( _Semaphore_Translate_core_mutex_return_code(
    371                   _Thread_Executing->Wait.return_code ) );
     370        return _Semaphore_Translate_core_mutex_return_code(
     371                  _Thread_Executing->Wait.return_code );
    372372      } else {
    373373        _CORE_semaphore_Seize(
     
    378378        );
    379379        _Thread_Enable_dispatch();
    380         return( _Semaphore_Translate_core_semaphore_return_code(
    381                   _Thread_Executing->Wait.return_code ) );
     380        return _Semaphore_Translate_core_semaphore_return_code(
     381                  _Thread_Executing->Wait.return_code );
    382382      }
    383383  }
    384384
    385   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     385  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    386386}
    387387
     
    412412  switch ( location ) {
    413413    case OBJECTS_ERROR:
    414       return( RTEMS_INVALID_ID );
     414      return RTEMS_INVALID_ID;
    415415    case OBJECTS_REMOTE:
    416       return(
    417         _Semaphore_MP_Send_request_packet(
    418           SEMAPHORE_MP_RELEASE_REQUEST,
    419           id,
    420           0,                               /* Not used */
    421           MPCI_DEFAULT_TIMEOUT
    422         )
     416      return _Semaphore_MP_Send_request_packet(
     417        SEMAPHORE_MP_RELEASE_REQUEST,
     418        id,
     419        0,                               /* Not used */
     420        MPCI_DEFAULT_TIMEOUT
    423421      );
    424422    case OBJECTS_LOCAL:
     
    430428                       );
    431429        _Thread_Enable_dispatch();
    432         return( _Semaphore_Translate_core_mutex_return_code( mutex_status ) );
     430        return _Semaphore_Translate_core_mutex_return_code( mutex_status );
    433431      }
    434432      else
     
    439437                           );
    440438        _Thread_Enable_dispatch();
    441         return(
    442           _Semaphore_Translate_core_semaphore_return_code( semaphore_status ) );
    443   }
    444 
    445   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     439        return
     440          _Semaphore_Translate_core_semaphore_return_code( semaphore_status );
     441  }
     442
     443  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    446444}
    447445
     
    464462  switch ( the_mutex_status ) {
    465463    case  CORE_MUTEX_STATUS_SUCCESSFUL:
    466       return( RTEMS_SUCCESSFUL );
     464      return RTEMS_SUCCESSFUL;
    467465    case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT:
    468       return( RTEMS_UNSATISFIED );
     466      return RTEMS_UNSATISFIED;
    469467    case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED:
    470       return( RTEMS_INTERNAL_ERROR );
     468      return RTEMS_INTERNAL_ERROR;
    471469    case CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE:
    472       return( RTEMS_NOT_OWNER_OF_RESOURCE );
     470      return RTEMS_NOT_OWNER_OF_RESOURCE;
    473471    case CORE_MUTEX_WAS_DELETED:
    474       return( RTEMS_OBJECT_WAS_DELETED );
     472      return RTEMS_OBJECT_WAS_DELETED;
    475473    case CORE_MUTEX_TIMEOUT:
    476       return( RTEMS_TIMEOUT );
     474      return RTEMS_TIMEOUT;
    477475    case THREAD_STATUS_PROXY_BLOCKING:
    478       return( THREAD_STATUS_PROXY_BLOCKING );
    479   }
    480   _Internal_error_Occurred(
    481     INTERNAL_ERROR_RTEMS_API,
    482     TRUE,
    483     the_mutex_status
    484   );
    485   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     476      return THREAD_STATUS_PROXY_BLOCKING;
     477  }
     478  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    486479}
    487480
     
    504497  switch ( the_semaphore_status ) {
    505498    case  CORE_SEMAPHORE_STATUS_SUCCESSFUL:
    506       return( RTEMS_SUCCESSFUL );
     499      return RTEMS_SUCCESSFUL;
    507500    case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
    508       return( RTEMS_UNSATISFIED );
     501      return RTEMS_UNSATISFIED;
    509502    case CORE_SEMAPHORE_WAS_DELETED:
    510       return( RTEMS_OBJECT_WAS_DELETED );
     503      return RTEMS_OBJECT_WAS_DELETED;
    511504    case CORE_SEMAPHORE_TIMEOUT:
    512       return( RTEMS_TIMEOUT );
     505      return RTEMS_TIMEOUT;
    513506    case THREAD_STATUS_PROXY_BLOCKING:
    514       return( THREAD_STATUS_PROXY_BLOCKING );
    515   }
    516   _Internal_error_Occurred(
    517     INTERNAL_ERROR_RTEMS_API,
    518     TRUE,
    519     the_semaphore_status
    520   );
    521   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
    522   return( RTEMS_INTERNAL_ERROR );   /* unreached - only to remove warnings */
     507      return THREAD_STATUS_PROXY_BLOCKING;
     508  }
     509  return RTEMS_INTERNAL_ERROR;   /* unreached - only to remove warnings */
    523510}
    524511
  • c/src/exec/rtems/src/tasks.c

    rb3ac6a8d r3652ad35  
    115115 
    116116  _ISR_Disable( level );
    117 
    118   signal_set = asr->signals_posted;
    119  
    120   if ( signal_set ) {
    121   /* if ( _ASR_Are_signals_pending( asr ) ) {
    122  
    123     signal_set          = asr->signals_posted; */
     117    signal_set = asr->signals_posted;
    124118    asr->signals_posted = 0;
    125     _ISR_Enable( level );
    126  
    127     asr->nest_level += 1;
    128     rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
    129  
    130     (*asr->handler)( signal_set );
    131  
    132     asr->nest_level -= 1;
    133     rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
    134   }
    135   else
    136     _ISR_Enable( level );
     119  _ISR_Enable( level );
     120 
     121 
     122  if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
     123    return;
     124 
     125  asr->nest_level += 1;
     126  rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
     127 
     128  (*asr->handler)( signal_set );
     129
     130  asr->nest_level -= 1;
     131  rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
    137132
    138133}
  • c/src/exec/sapi/headers/confdefs.h

    rb3ac6a8d r3652ad35  
    237237#endif
    238238
    239 /* Calculate the RAM size based on the maximum number of tasks configured */
     239/*
     240 *  Calculate the RAM size based on the maximum number of objects configured.
     241 *  The model is to estimate the memory required for each configured item,
     242 *  sum the memory requirements and insure that there is at least 32K greater
     243 *  than that for things not directly addressed such as:
     244 *
     245 *    + stacks greater than minimum size
     246 *    + FP contexts
     247 *    + API areas (should be optional)
     248 *    + messages
     249 *    + object name and local pointer table overhead
     250 *    + per node memory requirements
     251 *    + executive fixed requirements (including at least internal threads
     252 *       and the Ready chains)
     253 *
     254 *  NOTE:  Eventually this should take into account some of the above.
     255 *         Basically, this is a "back of the envelope" estimate for
     256 *         memory requirements.  It could be more accurate.
     257 */
    240258
    241259#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
    242 #define CONFIGURE_MEMORY_REQUIRED(_tasks) \
    243   (_tasks) * ( (sizeof(Thread_Control) + CONTEXT_FP_SIZE + STACK_MINIMUM_SIZE))
     260
     261#define CONFIGURE_OBJECT_TABLE_STUFF \
     262  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
     263
     264#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
     265  ((_tasks) * \
     266   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
     267      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
     268      CONFIGURE_OBJECT_TABLE_STUFF)) \
     269  )
     270
     271#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
     272  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     273
     274#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
     275  ((_semaphores) * \
     276   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     277
     278#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
     279  ( (_queues) * \
     280    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     281
     282#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
     283  ( (_partitions) * \
     284    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     285
     286#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
     287  ( (_regions) * \
     288    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     289
     290#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
     291  ( (_ports) * \
     292    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     293
     294#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
     295  ( (_periods) * \
     296    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     297
     298#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
     299  ( (_extensions) * \
     300    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     301
     302#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
     303  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
     304
     305#ifdef CONFIGURE_MPTEST
     306
     307#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
     308
     309#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
     310  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )
     311
     312#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
     313  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )
     314
     315#define CONFIGURE_MEMORY_FOR_MP \
     316  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
     317    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) \
     318  )
     319
     320#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
     321
     322#else
     323
     324#define CONFIGURE_MEMORY_FOR_MP  0
     325
     326#endif
    244327#define CONFIGURE_EXECUTIVE_RAM_SIZE \
    245 ( (CONFIGURE_MEMORY_REQUIRED(CONFIGURE_MAXIMUM_TASKS) + (128*1024)) &0xffff0000)
     328(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
     329   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
     330   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
     331   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
     332   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
     333   CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
     334   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
     335   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
     336   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
     337   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
     338   CONFIGURE_MEMORY_FOR_MP + \
     339   (96*1024) \
     340) & 0xffff8000)
    246341#endif
    247342
  • c/src/exec/sapi/include/confdefs.h

    rb3ac6a8d r3652ad35  
    237237#endif
    238238
    239 /* Calculate the RAM size based on the maximum number of tasks configured */
     239/*
     240 *  Calculate the RAM size based on the maximum number of objects configured.
     241 *  The model is to estimate the memory required for each configured item,
     242 *  sum the memory requirements and insure that there is at least 32K greater
     243 *  than that for things not directly addressed such as:
     244 *
     245 *    + stacks greater than minimum size
     246 *    + FP contexts
     247 *    + API areas (should be optional)
     248 *    + messages
     249 *    + object name and local pointer table overhead
     250 *    + per node memory requirements
     251 *    + executive fixed requirements (including at least internal threads
     252 *       and the Ready chains)
     253 *
     254 *  NOTE:  Eventually this should take into account some of the above.
     255 *         Basically, this is a "back of the envelope" estimate for
     256 *         memory requirements.  It could be more accurate.
     257 */
    240258
    241259#ifndef CONFIGURE_EXECUTIVE_RAM_SIZE
    242 #define CONFIGURE_MEMORY_REQUIRED(_tasks) \
    243   (_tasks) * ( (sizeof(Thread_Control) + CONTEXT_FP_SIZE + STACK_MINIMUM_SIZE))
     260
     261#define CONFIGURE_OBJECT_TABLE_STUFF \
     262  ( sizeof(Objects_Control *) + sizeof(rtems_name *) + sizeof(rtems_name) )
     263
     264#define CONFIGURE_MEMORY_FOR_TASKS(_tasks) \
     265  ((_tasks) * \
     266   ((sizeof(Thread_Control) + CONTEXT_FP_SIZE + \
     267      STACK_MINIMUM_SIZE + sizeof( RTEMS_API_Control ) + \
     268      CONFIGURE_OBJECT_TABLE_STUFF)) \
     269  )
     270
     271#define CONFIGURE_MEMORY_FOR_TIMERS(_timers) \
     272  ((_timers) * ( sizeof(Timer_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     273
     274#define CONFIGURE_MEMORY_FOR_SEMAPHORES(_semaphores) \
     275  ((_semaphores) * \
     276   ( sizeof(Semaphore_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     277
     278#define CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(_queues) \
     279  ( (_queues) * \
     280    ( sizeof(Message_queue_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     281
     282#define CONFIGURE_MEMORY_FOR_PARTITIONS(_partitions) \
     283  ( (_partitions) * \
     284    ( sizeof(Partition_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     285
     286#define CONFIGURE_MEMORY_FOR_REGIONS(_regions) \
     287  ( (_regions) * \
     288    ( sizeof(Region_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     289
     290#define CONFIGURE_MEMORY_FOR_PORTS(_ports) \
     291  ( (_ports) * \
     292    ( sizeof(Dual_ported_memory_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     293
     294#define CONFIGURE_MEMORY_FOR_PERIODS(_periods) \
     295  ( (_periods) * \
     296    ( sizeof(Rate_monotonic_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     297
     298#define CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(_extensions) \
     299  ( (_extensions) * \
     300    ( sizeof(Extension_Control) + CONFIGURE_OBJECT_TABLE_STUFF ) )
     301
     302#define CONFIGURE_MEMORY_FOR_DEVICES(_devices) \
     303  (((_devices) + 1) * ( sizeof(rtems_driver_name_t) ) )
     304
     305#ifdef CONFIGURE_MPTEST
     306
     307#ifndef CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE
     308
     309#define CONFIGURE_MEMORY_FOR_PROXIES(_proxies) \
     310  ( ((_proxies) + 1) * ( sizeof(Thread_Proxy_control) )  )
     311
     312#define CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(_global_objects) \
     313  ((_global_objects)  * ( sizeof(Objects_MP_Control) )  )
     314
     315#define CONFIGURE_MEMORY_FOR_MP \
     316  ( CONFIGURE_MEMORY_FOR_PROXIES(CONFIGURE_MP_MAXIMUM_PROXIES) + \
     317    CONFIGURE_MEMORY_FOR_GLOBAL_OBJECTS(CONFIGURE_MP_MAXIMUM_GLOBAL_OBJECTS) \
     318  )
     319
     320#endif  /* CONFIGURE_HAS_OWN_MULTIPROCESING_TABLE */
     321
     322#else
     323
     324#define CONFIGURE_MEMORY_FOR_MP  0
     325
     326#endif
    244327#define CONFIGURE_EXECUTIVE_RAM_SIZE \
    245 ( (CONFIGURE_MEMORY_REQUIRED(CONFIGURE_MAXIMUM_TASKS) + (128*1024)) &0xffff0000)
     328(( CONFIGURE_MEMORY_FOR_TASKS(CONFIGURE_MAXIMUM_TASKS) + \
     329   CONFIGURE_MEMORY_FOR_TIMERS(CONFIGURE_MAXIMUM_TIMERS) + \
     330   CONFIGURE_MEMORY_FOR_SEMAPHORES(CONFIGURE_MAXIMUM_SEMAPHORES) + \
     331   CONFIGURE_MEMORY_FOR_MESSAGE_QUEUES(CONFIGURE_MAXIMUM_MESSAGE_QUEUES) + \
     332   CONFIGURE_MEMORY_FOR_PARTITIONS(CONFIGURE_MAXIMUM_PARTITIONS) + \
     333   CONFIGURE_MEMORY_FOR_REGIONS(CONFIGURE_MAXIMUM_REGIONS) + \
     334   CONFIGURE_MEMORY_FOR_PORTS(CONFIGURE_MAXIMUM_PORTS) + \
     335   CONFIGURE_MEMORY_FOR_PERIODS(CONFIGURE_MAXIMUM_PERIODS) + \
     336   CONFIGURE_MEMORY_FOR_USER_EXTENSIONS(CONFIGURE_MAXIMUM_USER_EXTENSIONS) + \
     337   CONFIGURE_MEMORY_FOR_DEVICES(CONFIGURE_MAXIMUM_DEVICES) + \
     338   CONFIGURE_MEMORY_FOR_MP + \
     339   (96*1024) \
     340) & 0xffff8000)
    246341#endif
    247342
  • c/src/exec/score/cpu/hppa1.1/cpu.c

    rb3ac6a8d r3652ad35  
    194194hppa_external_interrupt_initialize(void)
    195195{
    196     hppa_rtems_isr_entry ignore;
     196    hppa_rtems_isr_entry ignore = 0;
    197197
    198198    /* mark them all unused */
     
    202202
    203203    /* install the external interrupt handler */
    204     rtems_interrupt_catch((rtems_isr_entry) hppa_external_interrupt,
    205                           HPPA_INTERRUPT_EXTERNAL_INTERRUPT, &ignore) ;
     204  _CPU_ISR_install_vector(
     205    HPPA_INTERRUPT_EXTERNAL_INTERRUPT,
     206    (proc_ptr)hppa_external_interrupt,
     207    (proc_ptr *)ignore
     208  );
    206209}
    207210
  • c/src/exec/score/cpu/hppa1.1/cpu_asm.s

    rb3ac6a8d r3652ad35  
    2525#      suitability of this software for any purpose.
    2626#
    27  *  $Id$
     27#  $Id$
    2828#
    2929
  • c/src/exec/score/cpu/hppa1.1/hppa.h

    rb3ac6a8d r3652ad35  
    637637
    638638#define EMIT_SET_CONTROL(name, reg)            \
    639 static __inline__ unsigned int                 \
     639static __inline__ void                         \
    640640set_ ## name (unsigned int new_value)          \
    641641{                                              \
  • c/src/exec/score/cpu/hppa1.1/rtems.s

    rb3ac6a8d r3652ad35  
    1515 */
    1616
    17 #include <rtems/hppa.h>
     17#include <rtems/core/hppa.h>
    1818#include <rtems/core/cpu_asm.h>
    1919
  • c/src/exec/score/cpu/i386/cpu.c

    rb3ac6a8d r3652ad35  
    3535{
    3636  register unsigned16  fp_status asm ("ax");
    37   register unsigned8  *fp_context;
     37  register void       *fp_context;
    3838
    3939  _CPU_Table = *cpu_table;
     
    5757  if ( fp_status ==  0 ) {
    5858
    59     fp_context = _CPU_Null_fp_context;
     59    fp_context = &_CPU_Null_fp_context;
    6060
    6161    asm volatile( "fsave (%0)" : "=r" (fp_context)
  • c/src/exec/score/cpu/i386/cpu.h

    rb3ac6a8d r3652ad35  
    148148/*
    149149 *  Minimum size of a thread's stack.
    150  *
    151  *  NOTE:  256 bytes is probably too low in most cases.
    152  */
    153 
    154 #define CPU_STACK_MINIMUM_SIZE          256
     150 */
     151
     152#define CPU_STACK_MINIMUM_SIZE          1024
    155153
    156154/*
     
    233231#define _CPU_Context_Initialize_fp( _fp_area ) \
    234232  { \
    235     unsigned32 *_source      = (unsigned32 *) _CPU_Null_fp_context; \
    236     unsigned32 *_destination = (unsigned32 *) *(_fp_area); \
     233    unsigned32 *_source      = (unsigned32 *) &_CPU_Null_fp_context; \
     234    unsigned32 *_destination = *(_fp_area); \
    237235    unsigned32  _index; \
    238236    \
  • c/src/exec/score/cpu/i386/i386.h

    rb3ac6a8d r3652ad35  
    171171    register unsigned32 _eflags = 0; \
    172172    \
    173     asm volatile ( "push %0 ; \
    174                     popf " \
     173    asm volatile ( "pushf ; \
     174                    pop %0" \
    175175                    : "=r" ((_eflags)) : "0" ((_eflags)) \
    176176    ); \
  • c/src/exec/score/cpu/i960/cpu.h

    rb3ac6a8d r3652ad35  
    180180
    181181#define CPU_SYSTEM_INITIALIZATION_THREAD_EXTRA_STACK \
    182    (4096 - CPU_STACK_MINIMUM_SIZE)
     182   (CPU_STACK_MINIMUM_SIZE)
    183183
    184184/*
     
    194194 */
    195195
    196 #define CPU_STACK_MINIMUM_SIZE          1024
     196#define CPU_STACK_MINIMUM_SIZE          2048
    197197
    198198/*
  • c/src/exec/score/cpu/m68k/cpu.h

    rb3ac6a8d r3652ad35  
    178178/*
    179179 *  Minimum size of a thread's stack.
    180  *
    181  *  NOTE:  256 bytes is probably too low in most cases.
    182  */
    183 
    184 #define CPU_STACK_MINIMUM_SIZE           256
     180 */
     181
     182#define CPU_STACK_MINIMUM_SIZE           1024
    185183
    186184/*
  • c/src/exec/score/cpu/unix/cpu.c

    rb3ac6a8d r3652ad35  
    11/*
    2  *  HP PA-RISC CPU Dependent Source
     2 *  UNIX Simulator Dependent Source
    33 *
    44 *
     
    1919#include <rtems/system.h>
    2020#include <rtems/core/isr.h>
     21#include <rtems/core/interr.h>
    2122
    2223#include <stdio.h>
     
    170171
    171172  _CPU_ISR_Set_level( 0 );
    172   setjmp( _CPU_Context_Default_with_ISRs_enabled.regs );
    173   sigprocmask(
    174     SIG_SETMASK,    /* ignored when second arg is NULL */
    175     0,
    176     &_CPU_Context_Default_with_ISRs_enabled.isr_level
     173  _CPU_Context_switch(
     174    &_CPU_Context_Default_with_ISRs_enabled,
     175    &_CPU_Context_Default_with_ISRs_enabled
    177176  );
    178177
    179178  _CPU_ISR_Set_level( 1 );
    180   setjmp( _CPU_Context_Default_with_ISRs_disabled.regs );
    181   sigprocmask(
    182     SIG_SETMASK,    /* ignored when second arg is NULL */
    183     0,
    184     &_CPU_Context_Default_with_ISRs_disabled.isr_level
     179  _CPU_Context_switch(
     180    &_CPU_Context_Default_with_ISRs_disabled,
     181    &_CPU_Context_Default_with_ISRs_disabled
    185182  );
    186 
    187183}
    188184
     
    192188 */
    193189
     190sigset_t GET_old_mask;
     191
    194192unsigned32 _CPU_ISR_Get_level( void )
    195193{
    196   sigset_t sigset;
    197  
    198   sigprocmask( 0, 0, &sigset );
    199 
    200   /*
    201    *  This is an educated guess based on ONLY ONE of the signals we
    202    *  disable/enable to mask ISRs.
    203    */
    204 
    205   if ( sigismember( &sigset, SIGUSR1 ) )
    206     return 1;
    207   else
    208     return 0;
     194/*  sigset_t  old_mask; */
     195   unsigned32 old_level;
     196 
     197  sigprocmask(0, 0, &GET_old_mask);
     198 
     199  if (memcmp((void *)&posix_empty_mask, (void *)&GET_old_mask, sizeof(sigset_t)))
     200    old_level = 1;
     201  else
     202    old_level = 0;
     203
     204  return old_level;
    209205}
    210206
     
    384380    source = _CPU_Context_Default_with_ISRs_disabled.regs;
    385381     
    386   memcpy(_the_context, source, sizeof(jmp_buf));
     382  memcpy(_the_context, source, sizeof(Context_Control) ); /* sizeof(jmp_buf)); */
    387383
    388384  addr = (unsigned32 *)_the_context;
     
    471467)
    472468{
     469  int status;
     470
    473471  /*
    474472   *  Switch levels in one operation
    475473   */
    476474
    477   sigprocmask( SIG_SETMASK, &next->isr_level, &current->isr_level );
     475  status = sigprocmask( SIG_SETMASK, &next->isr_level, &current->isr_level );
     476  if ( status )
     477    _Internal_error_Occurred(
     478      INTERNAL_ERROR_CORE,
     479      TRUE,
     480      status
     481    );
    478482
    479483  if (setjmp(current->regs) == 0) {    /* Save the current context */
    480484     longjmp(next->regs, 0);           /* Switch to the new context */
    481   }
     485     if ( status )
     486       _Internal_error_Occurred(
     487         INTERNAL_ERROR_CORE,
     488         TRUE,
     489         status
     490       );
     491  }
     492
    482493}
    483494 
     
    511522unsigned32 _CPU_ISR_Disable_support(void)
    512523{
     524  int status;
    513525  sigset_t  old_mask;
    514526
    515   sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, &old_mask);
    516 
    517   if (memcmp((void *)&posix_empty_mask, (void *)&old_mask, sizeof(sigset_t)) != 0)
     527  status = sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, &old_mask);
     528  if ( status )
     529    _Internal_error_Occurred(
     530      INTERNAL_ERROR_CORE,
     531      TRUE,
     532      status
     533    );
     534
     535  if (memcmp((void *)&posix_empty_mask, (void *)&old_mask, sizeof(sigset_t)))
    518536    return 1;
    519537
     
    530548)
    531549{
     550  int status;
     551
    532552  if (level == 0)
    533     sigprocmask(SIG_UNBLOCK, &_CPU_Signal_mask, 0);
     553    status = sigprocmask(SIG_UNBLOCK, &_CPU_Signal_mask, 0);
    534554  else
    535     sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, 0);
     555    status = sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, 0);
     556
     557  if ( status )
     558    _Internal_error_Occurred(
     559      INTERNAL_ERROR_CORE,
     560      TRUE,
     561      status
     562    );
    536563}
    537564
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    3030#include <bsp.h>
    3131#include <rtems/libio.h>
     32#include <rtems/core/intthrd.h>
    3233
    3334#include <libcsupport.h>
     
    8687     */
    8788
    88     if (heir_task->name == rtems_build_name('I', 'D', 'L', 'E'))
     89    if (heir_task == _Internal_threads_Idle_thread)
    8990        CPU_HPPA_CLICKS_PER_TICK = fast_clock;
    90     else if (current_task->name == rtems_build_name('I', 'D', 'L', 'E'))
     91    else if (heir_task == _Internal_threads_Idle_thread)
    9192        CPU_HPPA_CLICKS_PER_TICK = normal_clock;
    9293}
     
    212213        memset(&fast_idle_extension, 0, sizeof(fast_idle_extension));
    213214
    214         fast_idle_extension.task_switch  = fast_idle_switch_hook;
     215        fast_idle_extension.thread_switch  = fast_idle_switch_hook;
    215216
    216217        rc = rtems_extension_create(rtems_build_name('F', 'D', 'L', 'E'),
  • c/src/lib/libbsp/i386/force386/console/console.c

    rb3ac6a8d r3652ad35  
    267267    outbyte( buffer[ count ] );
    268268  }
    269   return maximum;
     269
     270  rw_args->bytes_moved = maximum;
     271  return 0;
    270272}
    271273 
  • c/src/lib/libbsp/i386/force386/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    7575    else
    7676        libc_init(0);                /* non-reentrant */
    77 
     77}
     78
     79/*
     80 *  Function:   bsp_pretasking_hook
     81 *  Created:    95/03/10
     82 *
     83 *  Description:
     84 *      BSP pretasking hook.  Called just before drivers are initialized.
     85 *      Used to setup libc and install any BSP extensions.
     86 *
     87 *  NOTES:
     88 *      Must not use libc (to do io) from here, since drivers are
     89 *      not yet initialized.
     90 *
     91 */
     92 
     93void
     94bsp_pretasking_hook(void)
     95{
     96    bsp_libc_init();
     97 
     98#ifdef STACK_CHECKER_ON
    7899    /*
    79100     *  Initialize the stack bounds checker
     101     *  We can either turn it on here or from the app.
    80102     */
    81 
    82 #ifdef STACK_CHECKER_ON
     103 
    83104    Stack_check_Initialize();
    84105#endif
    85 
    86 }
     106 
     107#ifdef RTEMS_DEBUG
     108    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     109#endif
     110}
     111 
    87112
    88113/*
     
    136161   */
    137162
    138   Cpu_table.pretasking_hook = NULL;
    139 
    140   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     163  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     164
     165  Cpu_table.predriver_hook = NULL;
    141166
    142167  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/i386/go32/console/console.c

    rb3ac6a8d r3652ad35  
    238238    outbyte( buffer[ count ] );
    239239  }
    240   return maximum;
     240
     241  rw_args->bytes_moved = maximum;
     242  return 0;
    241243}
    242244 
  • c/src/lib/libbsp/i386/go32/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8282    else
    8383        libc_init(0);                /* non-reentrant */
    84 
     84}
     85 
     86/*
     87 *  Function:   bsp_pretasking_hook
     88 *  Created:    95/03/10
     89 *
     90 *  Description:
     91 *      BSP pretasking hook.  Called just before drivers are initialized.
     92 *      Used to setup libc and install any BSP extensions.
     93 *
     94 *  NOTES:
     95 *      Must not use libc (to do io) from here, since drivers are
     96 *      not yet initialized.
     97 *
     98 */
     99 
     100void
     101bsp_pretasking_hook(void)
     102{
     103    bsp_libc_init();
     104 
     105#ifdef STACK_CHECKER_ON
    85106    /*
    86107     *  Initialize the stack bounds checker
     108     *  We can either turn it on here or from the app.
    87109     */
    88 
    89 #ifdef STACK_CHECKER_ON
     110 
    90111    Stack_check_Initialize();
    91112#endif
    92 
    93 }
    94  
     113 
     114#ifdef RTEMS_DEBUG
     115    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     116#endif
     117}
     118 
     119
    95120/*
    96121 * After drivers are setup, register some "filenames"
     
    139164    rtems_progname = "RTEMS";
    140165
    141   Cpu_table.pretasking_hook     = NULL;
    142   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     166  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     167  Cpu_table.predriver_hook = NULL;
    143168  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    144169  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
  • c/src/lib/libbsp/i960/cvme961/console/console.c

    rb3ac6a8d r3652ad35  
    193193    outbyte( buffer[ count ] );
    194194  }
    195   return maximum;
     195
     196  rw_args->bytes_moved = maximum;
     197  return 0;
    196198}
    197199 
  • c/src/lib/libbsp/i960/cvme961/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    7777    else
    7878        libc_init(0);                /* non-reentrant */
     79}
     80
     81/*
     82 *  Function:   bsp_pretasking_hook
     83 *  Created:    95/03/10
     84 *
     85 *  Description:
     86 *      BSP pretasking hook.  Called just before drivers are initialized.
     87 *      Used to setup libc and install any BSP extensions.
     88 *
     89 *  NOTES:
     90 *      Must not use libc (to do io) from here, since drivers are
     91 *      not yet initialized.
     92 *
     93 */
     94 
     95void
     96bsp_pretasking_hook(void)
     97{
     98    bsp_libc_init();
     99 
     100#ifdef STACK_CHECKER_ON
    79101    /*
    80102     *  Initialize the stack bounds checker
     103     *  We can either turn it on here or from the app.
    81104     */
    82 
    83 #ifdef STACK_CHECKER_ON
     105 
    84106    Stack_check_Initialize();
    85107#endif
    86 }
     108 
     109#ifdef RTEMS_DEBUG
     110    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     111#endif
     112}
     113 
    87114
    88115/*
     
    153180   */
    154181
    155   Cpu_table.pretasking_hook = NULL;
    156 
    157   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     182  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     183
     184  Cpu_table.predriver_hook = NULL;
    158185
    159186  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/dmv152/console/console.c

    rb3ac6a8d r3652ad35  
    231231    outbyte( buffer[ count ] );
    232232  }
    233   return maximum;
     233
     234  rw_args->bytes_moved = maximum;
     235  return 0;
    234236}
    235237
  • c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    7676    else
    7777        libc_init(0);                /* non-reentrant */
    78 
     78}
     79
     80/*
     81 *  Function:   bsp_pretasking_hook
     82 *  Created:    95/03/10
     83 *
     84 *  Description:
     85 *      BSP pretasking hook.  Called just before drivers are initialized.
     86 *      Used to setup libc and install any BSP extensions.
     87 *
     88 *  NOTES:
     89 *      Must not use libc (to do io) from here, since drivers are
     90 *      not yet initialized.
     91 *
     92 */
     93 
     94void
     95bsp_pretasking_hook(void)
     96{
     97    bsp_libc_init();
     98 
     99#ifdef STACK_CHECKER_ON
    79100    /*
    80101     *  Initialize the stack bounds checker
     102     *  We can either turn it on here or from the app.
    81103     */
    82 
    83 #ifdef STACK_CHECKER_ON
     104 
    84105    Stack_check_Initialize();
    85106#endif
    86 }
     107 
     108#ifdef RTEMS_DEBUG
     109    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     110#endif
     111}
     112 
    87113
    88114/*
     
    159185   */
    160186
    161   Cpu_table.pretasking_hook = NULL;
    162 
    163   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     187  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     188
     189  Cpu_table.predriver_hook = NULL;
    164190
    165191  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/gen68302/console/console.c

    rb3ac6a8d r3652ad35  
    286286    outbyte( buffer[ count ] );
    287287  }
    288   return maximum;
     288
     289  rw_args->bytes_moved = maximum;
     290  return 0;
    289291}
    290292
  • c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8383    else
    8484        libc_init(0);                /* non-reentrant */
    85 
     85}
     86
     87/*
     88 *  Function:   bsp_pretasking_hook
     89 *  Created:    95/03/10
     90 *
     91 *  Description:
     92 *      BSP pretasking hook.  Called just before drivers are initialized.
     93 *      Used to setup libc and install any BSP extensions.
     94 *
     95 *  NOTES:
     96 *      Must not use libc (to do io) from here, since drivers are
     97 *      not yet initialized.
     98 *
     99 */
     100 
     101void
     102bsp_pretasking_hook(void)
     103{
     104    bsp_libc_init();
     105 
     106#ifdef STACK_CHECKER_ON
    86107    /*
    87108     *  Initialize the stack bounds checker
    88      */
    89 
    90 #ifdef STACK_CHECKER_ON
     109     *  We can either turn it on here or from the app.
     110     */
     111 
    91112    Stack_check_Initialize();
    92113#endif
    93 }
     114 
     115#ifdef RTEMS_DEBUG
     116    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     117#endif
     118}
     119 
    94120
    95121/*
     
    193219   */
    194220
    195   Cpu_table.pretasking_hook = NULL;
    196 
    197   Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
     221  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     222
     223  Cpu_table.predriver_hook = NULL;
    198224
    199225  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/idp/console/console.c

    rb3ac6a8d r3652ad35  
    266266    outbyte( buffer[ count ], minor  );
    267267  }
    268   return maximum;
     268
     269  rw_args->bytes_moved = maximum;
     270  return 0;
    269271}
    270272
  • c/src/lib/libbsp/m68k/idp/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8484        else
    8585        libc_init(0);                /* non-reentrant */
    86  
     86}
     87
     88/*
     89 *  Function:   bsp_pretasking_hook
     90 *  Created:    95/03/10
     91 *
     92 *  Description:
     93 *      BSP pretasking hook.  Called just before drivers are initialized.
     94 *      Used to setup libc and install any BSP extensions.
     95 *
     96 *  NOTES:
     97 *      Must not use libc (to do io) from here, since drivers are
     98 *      not yet initialized.
     99 *
     100 */
     101 
     102void
     103bsp_pretasking_hook(void)
     104{
     105    bsp_libc_init();
     106 
     107#ifdef STACK_CHECKER_ON
    87108    /*
    88109     *  Initialize the stack bounds checker
     110     *  We can either turn it on here or from the app.
    89111     */
    90112 
    91 #ifdef STACK_CHECKER_ON
    92113    Stack_check_Initialize();
     114#endif
     115 
     116#ifdef RTEMS_DEBUG
     117    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
    93118#endif
    94119}
     
    167192   */
    168193 
    169   Cpu_table.pretasking_hook = NULL;
    170  
    171   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
    172  
     194  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     195
     196  Cpu_table.predriver_hook = NULL;
     197
    173198  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    174  
     199
    175200  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    176201
  • c/src/lib/libbsp/m68k/mvme136/console/console.c

    rb3ac6a8d r3652ad35  
    206206    outbyte( buffer[ count ] );
    207207  }
    208   return maximum;
     208
     209  rw_args->bytes_moved = maximum;
     210  return 0;
    209211}
    210212
  • c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    5454    extern int end;
    5555    rtems_unsigned32        heap_start;
    56 
    57 #ifdef RTEMS_DEBUG
    58     rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
    59 #endif
    6056
    6157    heap_start = (rtems_unsigned32) &end;
     
    8177    else
    8278        libc_init(0);                /* non-reentrant */
    83 
     79}
     80
     81/*
     82 *  Function:   bsp_pretasking_hook
     83 *  Created:    95/03/10
     84 *
     85 *  Description:
     86 *      BSP pretasking hook.  Called just before drivers are initialized.
     87 *      Used to setup libc and install any BSP extensions.
     88 *
     89 *  NOTES:
     90 *      Must not use libc (to do io) from here, since drivers are
     91 *      not yet initialized.
     92 *
     93 */
     94 
     95void
     96bsp_pretasking_hook(void)
     97{
     98    bsp_libc_init();
     99 
     100#ifdef STACK_CHECKER_ON
    84101    /*
    85102     *  Initialize the stack bounds checker
     103     *  We can either turn it on here or from the app.
    86104     */
    87 
    88 #ifdef STACK_CHECKER_ON
     105 
    89106    Stack_check_Initialize();
    90107#endif
    91 }
     108 
     109#ifdef RTEMS_DEBUG
     110    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     111#endif
     112}
     113 
    92114
    93115/*
     
    153175   */
    154176
    155   Cpu_table.pretasking_hook = NULL;
    156 
    157   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     177  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     178
     179  Cpu_table.predriver_hook = NULL;
    158180
    159181  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/mvme162/console/console.c

    rb3ac6a8d r3652ad35  
    238238    outbyte( buffer[ count ], minor  );
    239239  }
    240   return maximum;
     240
     241  rw_args->bytes_moved = maximum;
     242  return 0;
    241243}
    242244
  • c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8383    else
    8484        libc_init(0);                /* non-reentrant */
    85 
     85}
     86
     87/*
     88 *  Function:   bsp_pretasking_hook
     89 *  Created:    95/03/10
     90 *
     91 *  Description:
     92 *      BSP pretasking hook.  Called just before drivers are initialized.
     93 *      Used to setup libc and install any BSP extensions.
     94 *
     95 *  NOTES:
     96 *      Must not use libc (to do io) from here, since drivers are
     97 *      not yet initialized.
     98 *
     99 */
     100 
     101void
     102bsp_pretasking_hook(void)
     103{
     104    bsp_libc_init();
     105 
     106#ifdef STACK_CHECKER_ON
    86107    /*
    87108     *  Initialize the stack bounds checker
     109     *  We can either turn it on here or from the app.
    88110     */
    89 
    90 #ifdef STACK_CHECKER_ON
     111 
    91112    Stack_check_Initialize();
    92113#endif
    93 }
     114 
     115#ifdef RTEMS_DEBUG
     116    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     117#endif
     118}
     119 
    94120
    95121/*
     
    166192   */
    167193
    168   Cpu_table.pretasking_hook = NULL;
    169 
    170   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     194  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     195
     196  Cpu_table.predriver_hook = NULL;
    171197
    172198  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/no_cpu/no_bsp/console/console.c

    rb3ac6a8d r3652ad35  
    205205    outbyte( buffer[ count ] );
    206206  }
    207   return maximum;
     207
     208  rw_args->bytes_moved = maximum;
     209  return 0;
    208210}
    209211
  • c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8484    else
    8585        libc_init(0);                /* non-reentrant */
    86 
     86}
     87
     88/*
     89 *  Function:   bsp_pretasking_hook
     90 *  Created:    95/03/10
     91 *
     92 *  Description:
     93 *      BSP pretasking hook.  Called just before drivers are initialized.
     94 *      Used to setup libc and install any BSP extensions.
     95 *
     96 *  NOTES:
     97 *      Must not use libc (to do io) from here, since drivers are
     98 *      not yet initialized.
     99 *
     100 */
     101 
     102void
     103bsp_pretasking_hook(void)
     104{
     105    bsp_libc_init();
     106 
     107#ifdef STACK_CHECKER_ON
    87108    /*
    88109     *  Initialize the stack bounds checker
    89      */
    90 
    91 #ifdef STACK_CHECKER_ON
     110     *  We can either turn it on here or from the app.
     111     */
     112 
    92113    Stack_check_Initialize();
    93114#endif
    94 }
     115 
     116#ifdef RTEMS_DEBUG
     117    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     118#endif
     119}
     120 
    95121
    96122/*
     
    120146}
    121147
    122 int main(
     148int bsp_start(
    123149  int argc,
    124150  char **argv,
     
    197223   */
    198224
    199   Cpu_table.pretasking_hook = NULL;
    200 
    201   Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
     225  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     226
     227  Cpu_table.predriver_hook = NULL;
    202228
    203229  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/no_cpu/no_bsp/startup/main.c

    rb3ac6a8d r3652ad35  
    2020int main(
    2121  int   argc,
    22   char **argv
     22  char **argv,
     23  char **environp
    2324)
    2425{
    25   bsp_start();
     26  bsp_start( argc, argv, environp );
    2627
    2728  /*
  • c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    102102        libc_init(0);                /* non-reentrant */
    103103
     104}
     105
     106/*
     107 *  Function:   bsp_pretasking_hook
     108 *  Created:    95/03/10
     109 *
     110 *  Description:
     111 *      BSP pretasking hook.  Called just before drivers are initialized.
     112 *      Used to setup libc and install any BSP extensions.
     113 *
     114 *  NOTES:
     115 *      Must not use libc (to do io) from here, since drivers are
     116 *      not yet initialized.
     117 *
     118 */
     119 
     120void
     121bsp_pretasking_hook(void)
     122{
     123    bsp_libc_init();
     124 
     125#ifdef STACK_CHECKER_ON
    104126    /*
    105127     *  Initialize the stack bounds checker
    106      */
    107 
    108 #ifdef STACK_CHECKER_ON
     128     *  We can either turn it on here or from the app.
     129     */
     130 
    109131    Stack_check_Initialize();
    110132#endif
    111 }
     133 
     134#ifdef RTEMS_DEBUG
     135    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     136#endif
     137}
     138 
    112139
    113140/*
     
    205232   */
    206233
    207   /*
    208    *  we do not use the pretasking_hook
    209    */
    210 
    211   Cpu_table.pretasking_hook = NULL;
    212 
    213   Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
     234  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     235
     236  Cpu_table.predriver_hook = NULL;
    214237
    215238  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libmisc/monitor/mon-object.c

    rb3ac6a8d r3652ad35  
    131131#warning "TONY... FIX ME!!!!!"
    132132#if defined(hppa1_1)
    133 #error "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
     133#warning "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
    134134#endif
    135135        id = _Objects_Build_id(0, default_node, rtems_get_index(id));
  • c/src/lib/libmisc/monitor/mon-queue.c

    rb3ac6a8d r3652ad35  
    1919
    2020    canonical_queue->attributes = rtems_queue->attribute_set;
    21     canonical_queue->maximum_message_size = rtems_queue->maximum_message_size;
    22     canonical_queue->maximum_pending_messages = rtems_queue->maximum_pending_messages;
    23     canonical_queue->number_of_pending_messages = rtems_queue->number_of_pending_messages;
     21    canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
     22    canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
     23    canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
    2424}
    2525
  • c/src/libmisc/monitor/mon-object.c

    rb3ac6a8d r3652ad35  
    131131#warning "TONY... FIX ME!!!!!"
    132132#if defined(hppa1_1)
    133 #error "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
     133#warning "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
    134134#endif
    135135        id = _Objects_Build_id(0, default_node, rtems_get_index(id));
  • c/src/libmisc/monitor/mon-queue.c

    rb3ac6a8d r3652ad35  
    1919
    2020    canonical_queue->attributes = rtems_queue->attribute_set;
    21     canonical_queue->maximum_message_size = rtems_queue->maximum_message_size;
    22     canonical_queue->maximum_pending_messages = rtems_queue->maximum_pending_messages;
    23     canonical_queue->number_of_pending_messages = rtems_queue->number_of_pending_messages;
     21    canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
     22    canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
     23    canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
    2424}
    2525
  • c/src/tests/mptests/mp01/init.c

    rb3ac6a8d r3652ad35  
    5454    Task_name[ 1 ],
    5555    1,
    56     2048,
     56    RTEMS_MINIMUM_STACK_SIZE,
    5757    RTEMS_DEFAULT_MODES,
    5858    RTEMS_GLOBAL,
     
    6565    Task_name[ 2 ],
    6666    1,
    67     2048,
     67    RTEMS_MINIMUM_STACK_SIZE,
    6868    RTEMS_TIMESLICE,
    6969    RTEMS_GLOBAL,
     
    7676    Task_name[ 3 ],
    7777    1,
    78     2048,
     78    RTEMS_MINIMUM_STACK_SIZE,
    7979    RTEMS_DEFAULT_MODES,
    8080    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/mptests/mp02/init.c

    rb3ac6a8d r3652ad35  
    4444    Task_name[Multiprocessing_configuration.node],
    4545    1,
    46     2048,
     46    RTEMS_MINIMUM_STACK_SIZE,
    4747    RTEMS_NO_PREEMPT,
    4848    RTEMS_GLOBAL,
  • c/src/tests/mptests/mp03/init.c

    rb3ac6a8d r3652ad35  
    4444    Task_name[ Multiprocessing_configuration.node ],
    4545    1,
    46     2048,
     46    RTEMS_MINIMUM_STACK_SIZE,
    4747    RTEMS_NO_PREEMPT,
    4848    RTEMS_GLOBAL,
  • c/src/tests/mptests/mp04/init.c

    rb3ac6a8d r3652ad35  
    4444    Task_name[ Multiprocessing_configuration.node ],
    4545    Multiprocessing_configuration.node,
    46     2048,
     46    RTEMS_MINIMUM_STACK_SIZE,
    4747    RTEMS_DEFAULT_MODES,
    4848    RTEMS_GLOBAL,
  • c/src/tests/mptests/mp05/init.c

    rb3ac6a8d r3652ad35  
    4444    Task_name[Multiprocessing_configuration.node],
    4545    1,
    46     1024,
     46    RTEMS_MINIMUM_STACK_SIZE,
    4747    RTEMS_TIMESLICE,
    4848    RTEMS_GLOBAL,
  • c/src/tests/mptests/mp06/init.c

    rb3ac6a8d r3652ad35  
    4444    Task_name[Multiprocessing_configuration.node],
    4545    1,
    46     1024,
     46    RTEMS_MINIMUM_STACK_SIZE,
    4747    RTEMS_DEFAULT_MODES,
    4848    RTEMS_GLOBAL,
  • c/src/tests/mptests/mp07/init.c

    rb3ac6a8d r3652ad35  
    4444    Task_name[Multiprocessing_configuration.node],
    4545    1,
    46     2048,
     46    RTEMS_MINIMUM_STACK_SIZE,
    4747    RTEMS_TIMESLICE,
    4848    RTEMS_GLOBAL,
  • c/src/tests/mptests/mp08/init.c

    rb3ac6a8d r3652ad35  
    5858    Task_name[ Multiprocessing_configuration.node ],
    5959    1,
    60     2048,
     60    RTEMS_MINIMUM_STACK_SIZE,
    6161    RTEMS_TIMESLICE,
    6262    RTEMS_GLOBAL,
  • c/src/tests/mptests/mp09/init.c

    rb3ac6a8d r3652ad35  
    5858    Task_name[Multiprocessing_configuration.node],
    5959    1,
    60     1024,
     60    RTEMS_MINIMUM_STACK_SIZE,
    6161    RTEMS_TIMESLICE,
    6262    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/mptests/mp10/init.c

    rb3ac6a8d r3652ad35  
    8181      Task_name[ 1 ],
    8282      1,
    83       1024,
     83      RTEMS_MINIMUM_STACK_SIZE,
    8484      RTEMS_TIMESLICE,
    8585      RTEMS_DEFAULT_ATTRIBUTES,
     
    9696      Task_name[ 2 ],
    9797      1,
    98       1024,
     98      RTEMS_MINIMUM_STACK_SIZE,
    9999      RTEMS_TIMESLICE,
    100100      RTEMS_DEFAULT_ATTRIBUTES,
     
    111111      Task_name[ 3 ],
    112112      1,
    113       1024,
     113      RTEMS_MINIMUM_STACK_SIZE,
    114114      RTEMS_TIMESLICE,
    115115      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/mptests/mp11/init.c

    rb3ac6a8d r3652ad35  
    5555      Task_name[ 1 ],
    5656      1,
    57       1024,
     57      RTEMS_MINIMUM_STACK_SIZE,
    5858      RTEMS_DEFAULT_MODES,
    5959      RTEMS_GLOBAL,
  • c/src/tests/mptests/mp13/init.c

    rb3ac6a8d r3652ad35  
    7777    Task_name[ 1 ],
    7878    1,
    79     1024,
     79    RTEMS_MINIMUM_STACK_SIZE,
    8080    RTEMS_TIMESLICE,
    8181    RTEMS_DEFAULT_ATTRIBUTES,
     
    9292    Task_name[ 2 ],
    9393    1,
    94     1024,
     94    RTEMS_MINIMUM_STACK_SIZE,
    9595    RTEMS_TIMESLICE,
    9696    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/mptests/mp14/init.c

    rb3ac6a8d r3652ad35  
    121121    Task_name[ Multiprocessing_configuration.node ],
    122122    2,
    123     2048,
     123    RTEMS_MINIMUM_STACK_SIZE,
    124124    RTEMS_TIMESLICE,
    125125    RTEMS_GLOBAL,
     
    136136    Semaphore_task_name[ Multiprocessing_configuration.node ],
    137137    2,
    138     2048,
     138    RTEMS_MINIMUM_STACK_SIZE,
    139139    RTEMS_TIMESLICE,
    140140    RTEMS_GLOBAL,
     
    151151    Queue_task_name[ Multiprocessing_configuration.node ],
    152152    2,
    153     2048,
     153    RTEMS_MINIMUM_STACK_SIZE,
    154154    RTEMS_TIMESLICE,
    155155    RTEMS_GLOBAL,
     
    167167    Partition_task_name[ Multiprocessing_configuration.node ],
    168168    2,
    169     2048,
     169    RTEMS_MINIMUM_STACK_SIZE,
    170170    RTEMS_TIMESLICE,
    171171    RTEMS_GLOBAL,
  • c/src/tests/samples/base_mp/init.c

    rb3ac6a8d r3652ad35  
    3636  printf( "Creating and starting an application task\n" );
    3737  task_name = rtems_build_name( 'T', 'A', '1', ' ' );
    38   status = rtems_task_create( task_name, 1, 1024,
     38  status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE,
    3939             RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
    4040  status = rtems_task_start(
  • c/src/tests/samples/base_sp/init.c

    rb3ac6a8d r3652ad35  
    4040  task_name = rtems_build_name( 'T', 'A', '1', ' ' );
    4141
    42   status = rtems_task_create( task_name, 1, 1024,
     42  status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE,
    4343             RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid );
    4444
  • c/src/tests/samples/ticker/init.c

    rb3ac6a8d r3652ad35  
    4141  Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
    4242
    43   status = rtems_task_create( Task_name[ 1 ], 1, 1024, RTEMS_DEFAULT_MODES,
    44                         RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ] );
    45   status = rtems_task_create( Task_name[ 2 ], 1, 1024, RTEMS_DEFAULT_MODES,
    46                         RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ] );
    47   status = rtems_task_create( Task_name[ 3 ], 1, 1024, RTEMS_DEFAULT_MODES,
    48                         RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ] );
     43  status = rtems_task_create(
     44    Task_name[ 1 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
     45    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 1 ]
     46  );
     47  status = rtems_task_create(
     48    Task_name[ 2 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
     49    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 2 ]
     50  );
     51  status = rtems_task_create(
     52    Task_name[ 3 ], 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
     53    RTEMS_DEFAULT_ATTRIBUTES, &Task_id[ 3 ]
     54  );
    4955
    5056  status = rtems_task_start( Task_id[ 1 ], Test_task, 1 );
  • c/src/tests/sptests/sp01/init.c

    rb3ac6a8d r3652ad35  
    4646     Task_name[ 1 ],
    4747     1,
    48      2 * 1024,
     48     RTEMS_MINIMUM_STACK_SIZE,
    4949     RTEMS_INTERRUPT_LEVEL(31),
    5050     RTEMS_DEFAULT_ATTRIBUTES,
     
    5656     Task_name[ 2 ],
    5757     1,
    58      2 * 1024,
     58     RTEMS_MINIMUM_STACK_SIZE * 2,
    5959     RTEMS_DEFAULT_MODES,
    6060     RTEMS_DEFAULT_ATTRIBUTES,
     
    6666     Task_name[ 3 ],
    6767     1,
    68      2 * 1024,
     68     RTEMS_MINIMUM_STACK_SIZE * 3,
    6969     RTEMS_DEFAULT_MODES,
    7070     RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp02/init.c

    rb3ac6a8d r3652ad35  
    3939     Preempt_task_name,
    4040     1,
    41      2048,
     41     RTEMS_MINIMUM_STACK_SIZE,
    4242     RTEMS_DEFAULT_MODES,
    4343     RTEMS_DEFAULT_ATTRIBUTES,
     
    6060     Task_name[ 1 ],
    6161     3,
    62      2048,
     62     RTEMS_MINIMUM_STACK_SIZE,
    6363     RTEMS_DEFAULT_MODES,
    6464     RTEMS_DEFAULT_ATTRIBUTES,
     
    7070     Task_name[ 2 ],
    7171     3,
    72      2048,
     72     RTEMS_MINIMUM_STACK_SIZE,
    7373     RTEMS_DEFAULT_MODES,
    7474     RTEMS_DEFAULT_ATTRIBUTES,
     
    8080     Task_name[ 3 ],
    8181     3,
    82      2048,
     82     RTEMS_MINIMUM_STACK_SIZE,
    8383     RTEMS_DEFAULT_MODES,
    8484     RTEMS_DEFAULT_ATTRIBUTES,
     
    112112     Task_name[ 1 ],
    113113     1,
    114      2048,
     114     RTEMS_MINIMUM_STACK_SIZE,
    115115     RTEMS_DEFAULT_MODES,
    116116     RTEMS_DEFAULT_ATTRIBUTES,
     
    122122     Task_name[ 2 ],
    123123     3,
    124      2048,
     124     RTEMS_MINIMUM_STACK_SIZE,
    125125     RTEMS_DEFAULT_MODES,
    126126     RTEMS_DEFAULT_ATTRIBUTES,
     
    132132     Task_name[ 3 ],
    133133     3,
    134      2048,
     134     RTEMS_MINIMUM_STACK_SIZE,
    135135     RTEMS_DEFAULT_MODES,
    136136     RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp03/init.c

    rb3ac6a8d r3652ad35  
    4040     Task_name[ 1 ],
    4141     1,
    42      2048,
     42     RTEMS_MINIMUM_STACK_SIZE,
    4343     RTEMS_DEFAULT_MODES,
    4444     RTEMS_DEFAULT_ATTRIBUTES,
     
    5050     Task_name[ 2 ],
    5151     1,
    52      2048,
     52     RTEMS_MINIMUM_STACK_SIZE,
    5353     RTEMS_DEFAULT_MODES,
    5454     RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp04/init.c

    rb3ac6a8d r3652ad35  
    7171     Task_name[ 1 ],
    7272     1,
    73      2048,
     73     RTEMS_MINIMUM_STACK_SIZE * 2,
    7474     RTEMS_TIMESLICE,
    7575     RTEMS_DEFAULT_ATTRIBUTES,
     
    8181     Task_name[ 2 ],
    8282     1,
    83      2048,
     83     RTEMS_MINIMUM_STACK_SIZE * 2,
    8484     RTEMS_TIMESLICE,
    8585     RTEMS_DEFAULT_ATTRIBUTES,
     
    9191     Task_name[ 3 ],
    9292     1,
    93      2048,
     93     RTEMS_MINIMUM_STACK_SIZE * 2,
    9494     RTEMS_TIMESLICE,
    9595     RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp05/init.c

    rb3ac6a8d r3652ad35  
    4141     Task_name[ 1 ],
    4242     1,
    43      2048,
     43     RTEMS_MINIMUM_STACK_SIZE,
    4444     RTEMS_DEFAULT_MODES,
    4545     RTEMS_DEFAULT_ATTRIBUTES,
     
    5151     Task_name[ 2 ],
    5252     1,
    53      2048,
     53     RTEMS_MINIMUM_STACK_SIZE,
    5454     RTEMS_DEFAULT_MODES,
    5555     RTEMS_DEFAULT_ATTRIBUTES,
     
    6161     Task_name[ 3 ],
    6262     1,
    63      2048,
     63     RTEMS_MINIMUM_STACK_SIZE,
    6464     RTEMS_DEFAULT_MODES,
    6565     RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp06/init.c

    rb3ac6a8d r3652ad35  
    4545     Task_name[ 1 ],
    4646     1,
    47      2048,
     47     RTEMS_MINIMUM_STACK_SIZE,
    4848     RTEMS_DEFAULT_MODES,
    4949     RTEMS_DEFAULT_ATTRIBUTES,
     
    5555     Task_name[ 2 ],
    5656     1,
    57      2048,
     57     RTEMS_MINIMUM_STACK_SIZE,
    5858     RTEMS_DEFAULT_MODES,
    5959     RTEMS_DEFAULT_ATTRIBUTES,
     
    6565     Task_name[ 3 ],
    6666     10,
    67      2048,
     67     RTEMS_MINIMUM_STACK_SIZE,
    6868     RTEMS_DEFAULT_MODES,
    6969     RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp07/init.c

    rb3ac6a8d r3652ad35  
    6363    Task_name[ 1 ],
    6464    4,
    65     2048,
     65    RTEMS_MINIMUM_STACK_SIZE,
    6666    RTEMS_DEFAULT_MODES,
    6767    RTEMS_DEFAULT_ATTRIBUTES,
     
    7373    Task_name[ 2 ],
    7474    4,
    75     2048,
     75    RTEMS_MINIMUM_STACK_SIZE,
    7676    RTEMS_DEFAULT_MODES,
    7777    RTEMS_DEFAULT_ATTRIBUTES,
     
    8383    Task_name[ 3 ],
    8484    250,
    85     2048,
     85    RTEMS_MINIMUM_STACK_SIZE,
    8686    RTEMS_DEFAULT_MODES,
    8787    RTEMS_DEFAULT_ATTRIBUTES,
     
    9393    Task_name[ 4 ],
    9494    254,
    95     2048,
     95    RTEMS_MINIMUM_STACK_SIZE,
    9696    RTEMS_DEFAULT_MODES,
    9797    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp08/init.c

    rb3ac6a8d r3652ad35  
    3939    Task_name[ 1 ],
    4040    1,
    41     2048,
     41    RTEMS_MINIMUM_STACK_SIZE,
    4242    RTEMS_DEFAULT_MODES,
    4343    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp09/init.c

    rb3ac6a8d r3652ad35  
    8383     Task_name[1],
    8484     0,
    85      2048,
     85     RTEMS_MINIMUM_STACK_SIZE,
    8686     RTEMS_DEFAULT_MODES,
    8787     RTEMS_DEFAULT_ATTRIBUTES,
     
    9898    Task_name[ 1 ],
    9999    4,
    100     2048,
     100    RTEMS_MINIMUM_STACK_SIZE * 3,
    101101    RTEMS_DEFAULT_MODES,
    102102    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp09/screen03.c

    rb3ac6a8d r3652ad35  
    3131    0,
    3232    1,
    33     2048,
     33    RTEMS_MINIMUM_STACK_SIZE,
    3434    RTEMS_DEFAULT_MODES,
    3535    RTEMS_DEFAULT_ATTRIBUTES,
     
    6161    Task_name[ 2 ],
    6262    4,
    63     2048,
     63    RTEMS_MINIMUM_STACK_SIZE,
    6464    RTEMS_DEFAULT_MODES,
    6565    RTEMS_DEFAULT_ATTRIBUTES,
     
    8888    Task_name[ 3 ],
    8989    4,
    90     2048,
     90    RTEMS_MINIMUM_STACK_SIZE,
    9191    RTEMS_DEFAULT_MODES,
    9292    RTEMS_DEFAULT_ATTRIBUTES,
     
    9999    Task_name[ 4 ],
    100100    4,
    101     2048,
     101    RTEMS_MINIMUM_STACK_SIZE,
    102102    RTEMS_DEFAULT_MODES,
    103103    RTEMS_DEFAULT_ATTRIBUTES,
     
    110110    Task_name[ 5 ],
    111111    4,
    112     2048,
     112    RTEMS_MINIMUM_STACK_SIZE,
    113113    RTEMS_DEFAULT_MODES,
    114114    RTEMS_DEFAULT_ATTRIBUTES,
     
    121121    Task_name[ 6 ],
    122122    4,
    123     2048,
     123    RTEMS_MINIMUM_STACK_SIZE,
    124124    RTEMS_DEFAULT_MODES,
    125125    RTEMS_DEFAULT_ATTRIBUTES,
     
    132132    Task_name[ 7 ],
    133133    4,
    134     2048,
     134    RTEMS_MINIMUM_STACK_SIZE,
    135135    RTEMS_DEFAULT_MODES,
    136136    RTEMS_DEFAULT_ATTRIBUTES,
     
    143143    Task_name[ 8 ],
    144144    4,
    145     2048,
     145    RTEMS_MINIMUM_STACK_SIZE,
    146146    RTEMS_DEFAULT_MODES,
    147147    RTEMS_DEFAULT_ATTRIBUTES,
     
    154154    Task_name[ 9 ],
    155155    4,
    156     2048,
     156    RTEMS_MINIMUM_STACK_SIZE,
    157157    RTEMS_DEFAULT_MODES,
    158158    RTEMS_DEFAULT_ATTRIBUTES,
     
    165165    Task_name[ 10 ],
    166166    4,
    167     2048,
     167    RTEMS_MINIMUM_STACK_SIZE,
    168168    RTEMS_DEFAULT_MODES,
    169169    RTEMS_DEFAULT_ATTRIBUTES,
     
    176176    task_name,
    177177    4,
    178     2048,
     178    RTEMS_MINIMUM_STACK_SIZE,
    179179    RTEMS_DEFAULT_MODES,
    180180    RTEMS_DEFAULT_ATTRIBUTES,
     
    191191    task_name,
    192192    4,
    193     2048,
     193    RTEMS_MINIMUM_STACK_SIZE,
    194194    RTEMS_DEFAULT_MODES,
    195195    RTEMS_GLOBAL,
  • c/src/tests/sptests/sp11/init.c

    rb3ac6a8d r3652ad35  
    4040    Task_name[ 1 ],
    4141    4,
    42     2048,
     42    RTEMS_MINIMUM_STACK_SIZE * 2,
    4343    RTEMS_DEFAULT_MODES,
    4444    RTEMS_DEFAULT_ATTRIBUTES,
     
    5050    Task_name[ 2 ],
    5151    4,
    52     2048,
     52    RTEMS_MINIMUM_STACK_SIZE,
    5353    RTEMS_DEFAULT_MODES,
    5454    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp12/init.c

    rb3ac6a8d r3652ad35  
    139139    Task_name[ 1 ],
    140140    4,
    141     2048,
     141    RTEMS_MINIMUM_STACK_SIZE,
    142142    RTEMS_DEFAULT_MODES,
    143143    RTEMS_DEFAULT_ATTRIBUTES,
     
    149149    Task_name[ 2 ],
    150150    4,
    151     2048,
     151    RTEMS_MINIMUM_STACK_SIZE,
    152152    RTEMS_DEFAULT_MODES,
    153153    RTEMS_DEFAULT_ATTRIBUTES,
     
    159159    Task_name[ 3 ],
    160160    4,
    161     2048,
     161    RTEMS_MINIMUM_STACK_SIZE,
    162162    RTEMS_DEFAULT_MODES,
    163163    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp12/pridrv.c

    rb3ac6a8d r3652ad35  
    4848      Priority_task_name[ index ],
    4949      Task_priority[ index ],
    50       2048,
     50      RTEMS_MINIMUM_STACK_SIZE,
    5151      RTEMS_DEFAULT_MODES,
    5252      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp12/task1.c

    rb3ac6a8d r3652ad35  
    101101    Task_name[ 4 ],
    102102    4,
    103     2048,
     103    RTEMS_MINIMUM_STACK_SIZE,
    104104    RTEMS_DEFAULT_MODES,
    105105    RTEMS_DEFAULT_ATTRIBUTES,
     
    111111    Task_name[ 5 ],
    112112    4,
    113     2048,
     113    RTEMS_MINIMUM_STACK_SIZE,
    114114    RTEMS_DEFAULT_MODES,
    115115    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp13/init.c

    rb3ac6a8d r3652ad35  
    4141    Task_name[ 1 ],
    4242    4,
    43     2048,
     43    RTEMS_MINIMUM_STACK_SIZE * 2,
    4444    RTEMS_DEFAULT_MODES,
    4545    RTEMS_DEFAULT_ATTRIBUTES,
     
    5151    Task_name[ 2 ],
    5252    4,
    53     2048,
     53    RTEMS_MINIMUM_STACK_SIZE,
    5454    RTEMS_DEFAULT_MODES,
    5555    RTEMS_DEFAULT_ATTRIBUTES,
     
    6161    Task_name[ 3 ],
    6262    4,
    63     2048,
     63    RTEMS_MINIMUM_STACK_SIZE,
    6464    RTEMS_DEFAULT_MODES,
    6565    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp14/init.c

    rb3ac6a8d r3652ad35  
    4040    Task_name[ 1 ],
    4141    4,
    42     2048,
     42    RTEMS_MINIMUM_STACK_SIZE,
    4343    RTEMS_DEFAULT_MODES,
    4444    RTEMS_DEFAULT_ATTRIBUTES,
     
    5050    Task_name[ 2 ],
    5151    4,
    52     2048,
     52    RTEMS_MINIMUM_STACK_SIZE,
    5353    RTEMS_DEFAULT_MODES,
    5454    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp15/init.c

    rb3ac6a8d r3652ad35  
    4242    Task_name[ 1 ],
    4343    4,
    44     2048,
     44    RTEMS_MINIMUM_STACK_SIZE,
    4545    RTEMS_DEFAULT_MODES,
    4646    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp16/init.c

    rb3ac6a8d r3652ad35  
    4343    Task_name[ 1 ],
    4444    BASE_PRIORITY,
    45     2048,
     45    RTEMS_MINIMUM_STACK_SIZE,
    4646    RTEMS_DEFAULT_MODES,
    4747    RTEMS_DEFAULT_ATTRIBUTES,
     
    5353    Task_name[ 2 ],
    5454    BASE_PRIORITY,
    55     2048,
     55    RTEMS_MINIMUM_STACK_SIZE,
    5656    RTEMS_DEFAULT_MODES,
    5757    RTEMS_DEFAULT_ATTRIBUTES,
     
    6363    Task_name[ 3 ],
    6464    BASE_PRIORITY,
    65     2048,
     65    RTEMS_MINIMUM_STACK_SIZE,
    6666    RTEMS_DEFAULT_MODES,
    6767    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp16/task1.c

    rb3ac6a8d r3652ad35  
    129129    Task_name[ 4 ],
    130130    BASE_PRIORITY,
    131     2048,
     131    RTEMS_MINIMUM_STACK_SIZE,
    132132    RTEMS_DEFAULT_MODES,
    133133    RTEMS_DEFAULT_ATTRIBUTES,
     
    139139    Task_name[ 5 ],
    140140    BASE_PRIORITY,
    141     2048,
     141    RTEMS_MINIMUM_STACK_SIZE,
    142142    RTEMS_DEFAULT_MODES,
    143143    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp17/init.c

    rb3ac6a8d r3652ad35  
    4242    Task_name[ 1 ],
    4343    2,
    44     2048,
     44    RTEMS_MINIMUM_STACK_SIZE,
    4545    RTEMS_DEFAULT_MODES,
    4646    RTEMS_DEFAULT_ATTRIBUTES,
     
    5555    Task_name[ 2 ],
    5656    1,
    57     2048,
     57    RTEMS_MINIMUM_STACK_SIZE,
    5858    RTEMS_DEFAULT_MODES,
    5959    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp19/init.c

    rb3ac6a8d r3652ad35  
    4444    Task_name[ 1 ],
    4545    2,
    46     8192,
     46    RTEMS_MINIMUM_STACK_SIZE * 4,
    4747    RTEMS_DEFAULT_MODES,
    4848    RTEMS_FLOATING_POINT,
     
    5454    Task_name[ 2 ],
    5555    2,
    56     8192,
     56    RTEMS_MINIMUM_STACK_SIZE * 4,
    5757    RTEMS_DEFAULT_MODES,
    5858    RTEMS_DEFAULT_ATTRIBUTES,
     
    6464    Task_name[ 3 ],
    6565    2,
    66     8192,
     66    RTEMS_MINIMUM_STACK_SIZE * 4,
    6767    RTEMS_DEFAULT_MODES,
    6868    RTEMS_DEFAULT_ATTRIBUTES,
     
    7474    Task_name[ 4 ],
    7575    2,
    76     8192,
     76    RTEMS_MINIMUM_STACK_SIZE * 4,
    7777    RTEMS_DEFAULT_MODES,
    7878    RTEMS_FLOATING_POINT,
     
    8484    Task_name[ 5 ],
    8585    2,
    86     8192,
     86    RTEMS_MINIMUM_STACK_SIZE * 4,
    8787    RTEMS_DEFAULT_MODES,
    8888    RTEMS_FLOATING_POINT,
     
    9494    Task_name[ 6 ],
    9595    1,
    96     8192,
     96    RTEMS_MINIMUM_STACK_SIZE * 4,
    9797    RTEMS_DEFAULT_MODES,
    9898    RTEMS_FLOATING_POINT,
  • c/src/tests/sptests/sp20/init.c

    rb3ac6a8d r3652ad35  
    4545      Task_name[ index ],
    4646      Priorities[ index ],
    47       4096,
     47      RTEMS_MINIMUM_STACK_SIZE,
    4848      RTEMS_DEFAULT_MODES,
    4949      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp21/init.c

    rb3ac6a8d r3652ad35  
    3939    Task_name[ 1 ],
    4040    1,
    41     2048,
     41    RTEMS_MINIMUM_STACK_SIZE,
    4242    RTEMS_DEFAULT_MODES,
    4343    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp22/init.c

    rb3ac6a8d r3652ad35  
    4646    Task_name[ 1 ],
    4747    1,
    48     2048,
     48    RTEMS_MINIMUM_STACK_SIZE,
    4949    RTEMS_DEFAULT_MODES,
    5050    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp23/init.c

    rb3ac6a8d r3652ad35  
    3939    Task_name[ 1 ],
    4040    1,
    41     2048,
     41    RTEMS_MINIMUM_STACK_SIZE,
    4242    RTEMS_DEFAULT_MODES,
    4343    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp24/init.c

    rb3ac6a8d r3652ad35  
    5353      Task_name[ index ],
    5454      1,
    55       2048,
     55      RTEMS_MINIMUM_STACK_SIZE,
    5656      RTEMS_DEFAULT_MODES,
    5757      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/sp25/init.c

    rb3ac6a8d r3652ad35  
    3939    Task_name[ 1 ],
    4040    BASE_PRIORITY,
    41     2048,
     41    RTEMS_MINIMUM_STACK_SIZE,
    4242    RTEMS_DEFAULT_MODES,
    4343    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/spfatal/init.c

    rb3ac6a8d r3652ad35  
    3737    Task_name[ 1 ],
    3838    1,
    39     2048,
     39    RTEMS_MINIMUM_STACK_SIZE,
    4040    RTEMS_DEFAULT_MODES,
    4141    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/sptests/spsize/size.c

    rb3ac6a8d r3652ad35  
    6767#define PER_MSGQ      \
    6868     (sizeof (Message_queue_Control) + NAME_PTR_SIZE)
    69 #define PER_MSG_OVERHEAD       \
    70      (sizeof (Message_queue_Buffer_control))
    7169#define PER_REGN      \
    7270     (sizeof (Region_Control) + NAME_PTR_SIZE)
     
    480478total_size += size_msgqs;
    481479
    482 printf( "What is maximum_messages? " );
     480printf( "What is maximum_messages?  XXXX " );
    483481maximum_msgs = getint();
    484 size_msgs_overhead = PER_MSG_OVERHEAD * maximum_msgs;
     482size_msgs_overhead = 0;
    485483total_size += size_msgs_overhead;
    486484
     
    571569          maximum_msgqs, PER_MSGQ, size_msgqs );
    572570printf( " Messages Overhead    - %03d * %03d            =  %d\n",
    573           maximum_msgs, PER_MSG_OVERHEAD, size_msgs_overhead );
     571          maximum_msgs, 0 /* PER_MSG_OVERHEAD */, size_msgs_overhead );
    574572printf( " Regions              - %03d * %03d            =  %d\n",
    575573          maximum_regns, PER_REGN, size_regns);
  • c/src/tests/tmtests/tm01/task1.c

    rb3ac6a8d r3652ad35  
    3636    Task_name[ 1 ],
    3737    128,
    38     4096,
     38    RTEMS_MINIMUM_STACK_SIZE,
    3939    RTEMS_DEFAULT_MODES,
    4040    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm02/task1.c

    rb3ac6a8d r3652ad35  
    6161    rtems_build_name( 'H', 'I', 'G', 'H' ),
    6262    priority,
    63     1024,
     63    RTEMS_MINIMUM_STACK_SIZE,
    6464    RTEMS_DEFAULT_MODES,
    6565    RTEMS_DEFAULT_ATTRIBUTES,
     
    7777      rtems_build_name( 'M', 'I', 'D', ' ' ),
    7878      priority,
    79       1024,
     79      RTEMS_MINIMUM_STACK_SIZE,
    8080      RTEMS_DEFAULT_MODES,
    8181      RTEMS_DEFAULT_ATTRIBUTES,
     
    9393    rtems_build_name( 'L', 'O', 'W', ' ' ),
    9494    priority,
    95     2048,
     95    RTEMS_MINIMUM_STACK_SIZE,
    9696    RTEMS_DEFAULT_MODES,
    9797    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm03/task1.c

    rb3ac6a8d r3652ad35  
    4242    rtems_build_name( 'T', 'A', '1', ' ' ),
    4343    252,
    44     2048,
     44    RTEMS_MINIMUM_STACK_SIZE,
    4545    RTEMS_DEFAULT_MODES,
    4646    RTEMS_DEFAULT_ATTRIBUTES,
     
    8080      rtems_build_name( 'M', 'I', 'D', ' ' ),
    8181      priority,
    82       1024,
     82      RTEMS_MINIMUM_STACK_SIZE,
    8383      RTEMS_DEFAULT_MODES,
    8484      RTEMS_DEFAULT_ATTRIBUTES,
     
    9696    rtems_build_name( 'H', 'I', 'G', 'H' ),
    9797    priority,
    98     1024,
     98    RTEMS_MINIMUM_STACK_SIZE,
    9999    RTEMS_DEFAULT_MODES,
    100100    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm04/task1.c

    rb3ac6a8d r3652ad35  
    6262      rtems_build_name( 'T', 'I', 'M', 'E' ),
    6363      10,
    64       1024,
     64      RTEMS_MINIMUM_STACK_SIZE,
    6565      RTEMS_NO_PREEMPT,
    6666      RTEMS_DEFAULT_ATTRIBUTES,
     
    180180        name,
    181181        10,
    182         1024,
     182        RTEMS_MINIMUM_STACK_SIZE,
    183183        RTEMS_NO_PREEMPT,
    184184        RTEMS_DEFAULT_ATTRIBUTES,
     
    218218      name,
    219219      250,
    220       1024,
     220      RTEMS_MINIMUM_STACK_SIZE,
    221221      RTEMS_NO_PREEMPT,
    222222      RTEMS_DEFAULT_ATTRIBUTES,
     
    265265      name,
    266266      250,
    267       1024,
     267      RTEMS_MINIMUM_STACK_SIZE,
    268268      RTEMS_DEFAULT_MODES,
    269269      RTEMS_DEFAULT_ATTRIBUTES,
     
    345345      rtems_build_name( 'H', 'I', ' ', ' ' ),
    346346      5,
    347       2048,
     347      RTEMS_MINIMUM_STACK_SIZE,
    348348      RTEMS_DEFAULT_MODES,
    349349      RTEMS_DEFAULT_ATTRIBUTES,
     
    358358      rtems_build_name( 'H', 'I', 'G', 'H' ),
    359359      3,
    360       2048,
     360      RTEMS_MINIMUM_STACK_SIZE,
    361361      RTEMS_DEFAULT_MODES,
    362362      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm05/task1.c

    rb3ac6a8d r3652ad35  
    6262      rtems_build_name( 'T', 'I', 'M', 'E' ),
    6363      priority,
    64       1024,
     64      RTEMS_MINIMUM_STACK_SIZE,
    6565      RTEMS_DEFAULT_MODES,
    6666      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm06/task1.c

    rb3ac6a8d r3652ad35  
    5555    rtems_build_name( 'T', 'I', 'M', 'E' ),
    5656    128,
    57     1024,
     57    RTEMS_MINIMUM_STACK_SIZE,
    5858    RTEMS_DEFAULT_MODES,
    5959    RTEMS_DEFAULT_ATTRIBUTES,
     
    100100      rtems_build_name( 'T', 'I', 'M', 'E' ),
    101101      254,
    102       1024,
     102      RTEMS_MINIMUM_STACK_SIZE,
    103103      RTEMS_DEFAULT_MODES,
    104104      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm07/task1.c

    rb3ac6a8d r3652ad35  
    6060      rtems_build_name( 'T', 'I', 'M', 'E' ),
    6161      priority,
    62       1024,
     62      RTEMS_MINIMUM_STACK_SIZE,
    6363      RTEMS_DEFAULT_MODES,
    6464      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm08/task1.c

    rb3ac6a8d r3652ad35  
    4848    1,
    4949    128,
    50     1024,
     50    RTEMS_MINIMUM_STACK_SIZE,
    5151    RTEMS_DEFAULT_MODES,
    5252    RTEMS_DEFAULT_ATTRIBUTES,
     
    6161    1,
    6262    254,
    63     1024,
     63    RTEMS_MINIMUM_STACK_SIZE,
    6464    RTEMS_DEFAULT_MODES,
    6565    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm09/task1.c

    rb3ac6a8d r3652ad35  
    3535    1,
    3636    128,
    37     4096,
     37    RTEMS_MINIMUM_STACK_SIZE,
    3838    RTEMS_DEFAULT_MODES,
    3939    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm10/task1.c

    rb3ac6a8d r3652ad35  
    6363      rtems_build_name( 'T', 'I', 'M', 'E' ),
    6464      priority,
    65       1024,
     65      RTEMS_MINIMUM_STACK_SIZE,
    6666      RTEMS_DEFAULT_MODES,
    6767      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm11/task1.c

    rb3ac6a8d r3652ad35  
    4646    1,
    4747    251,
    48     1024,
     48    RTEMS_MINIMUM_STACK_SIZE,
    4949    RTEMS_DEFAULT_MODES,
    5050    RTEMS_DEFAULT_ATTRIBUTES,
     
    9090      rtems_build_name( 'T', 'I', 'M', 'E'  ),
    9191      priority,
    92       1024,
     92      RTEMS_MINIMUM_STACK_SIZE,
    9393      RTEMS_DEFAULT_MODES,
    9494      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm12/task1.c

    rb3ac6a8d r3652ad35  
    4646    1,
    4747    251,
    48     1024,
     48    RTEMS_MINIMUM_STACK_SIZE,
    4949    RTEMS_DEFAULT_MODES,
    5050    RTEMS_DEFAULT_ATTRIBUTES,
     
    8686      rtems_build_name( 'T', 'I', 'M', 'E' ),
    8787      priority,
    88       1024,
     88      RTEMS_MINIMUM_STACK_SIZE,
    8989      RTEMS_DEFAULT_MODES,
    9090      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm13/task1.c

    rb3ac6a8d r3652ad35  
    4545    1,
    4646    251,
    47     1024,
     47    RTEMS_MINIMUM_STACK_SIZE,
    4848    RTEMS_DEFAULT_MODES,
    4949    RTEMS_DEFAULT_ATTRIBUTES,
     
    8989      rtems_build_name( 'T', 'I', 'M', 'E'  ),
    9090      priority,
    91       1024,
     91      RTEMS_MINIMUM_STACK_SIZE,
    9292      RTEMS_DEFAULT_MODES,
    9393      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm14/task1.c

    rb3ac6a8d r3652ad35  
    4646    1,
    4747    251,
    48     1024,
     48    RTEMS_MINIMUM_STACK_SIZE,
    4949    RTEMS_DEFAULT_MODES,
    5050    RTEMS_DEFAULT_ATTRIBUTES,
     
    8686      rtems_build_name( 'T', 'I', 'M', 'E' ),
    8787      priority,
    88       1024,
     88      RTEMS_MINIMUM_STACK_SIZE,
    8989      RTEMS_DEFAULT_MODES,
    9090      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm15/task1.c

    rb3ac6a8d r3652ad35  
    5555    rtems_build_name( 'L', 'O', 'W', ' ' ),
    5656    10,
    57     1024,
     57    RTEMS_MINIMUM_STACK_SIZE,
    5858    RTEMS_NO_PREEMPT,
    5959    RTEMS_DEFAULT_ATTRIBUTES,
     
    6969      rtems_build_name( 'H', 'I', 'G', 'H' ),
    7070      5,
    71       1024,
     71      RTEMS_MINIMUM_STACK_SIZE,
    7272      RTEMS_DEFAULT_MODES,
    7373      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm16/task1.c

    rb3ac6a8d r3652ad35  
    4343    rtems_build_name( 'T', 'E', 'S', 'T' ),
    4444    251,
    45     2048,
     45    RTEMS_MINIMUM_STACK_SIZE,
    4646    RTEMS_DEFAULT_MODES,
    4747    RTEMS_DEFAULT_ATTRIBUTES,
     
    7777      rtems_build_name( 'M', 'I', 'D', ' ' ),
    7878      priority,
    79       1024,
     79      RTEMS_MINIMUM_STACK_SIZE,
    8080      RTEMS_DEFAULT_MODES,
    8181      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm17/task1.c

    rb3ac6a8d r3652ad35  
    4848      rtems_build_name( 'T', 'I', 'M', 'E' ),
    4949      Task_priority,
    50       1024,
     50      RTEMS_MINIMUM_STACK_SIZE,
    5151      RTEMS_DEFAULT_MODES,
    5252      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm18/task1.c

    rb3ac6a8d r3652ad35  
    6060      rtems_build_name( 'T', 'I', 'M', 'E' ),
    6161      128,
    62       1024,
     62      RTEMS_MINIMUM_STACK_SIZE,
    6363      RTEMS_DEFAULT_MODES,
    6464      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm19/task1.c

    rb3ac6a8d r3652ad35  
    4848    rtems_build_name( 'T', 'I', 'M', 'E' ),
    4949    128,
    50     1024,
     50    RTEMS_MINIMUM_STACK_SIZE,
    5151    RTEMS_DEFAULT_MODES,
    5252    RTEMS_DEFAULT_ATTRIBUTES,
     
    6161    rtems_build_name( 'T', 'I', 'M', 'E' ),
    6262    127,
    63     1024,
     63    RTEMS_MINIMUM_STACK_SIZE,
    6464    RTEMS_DEFAULT_MODES,
    6565    RTEMS_DEFAULT_ATTRIBUTES,
     
    7474    rtems_build_name( 'T', 'I', 'M', 'E' ),
    7575    126,
    76     1024,
     76    RTEMS_MINIMUM_STACK_SIZE,
    7777    RTEMS_DEFAULT_MODES,
    7878    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm20/task1.c

    rb3ac6a8d r3652ad35  
    5555    rtems_build_name( 'T', 'I', 'M', '1' ),
    5656    128,
    57     2048,
     57    RTEMS_MINIMUM_STACK_SIZE,
    5858    RTEMS_DEFAULT_MODES,
    5959    RTEMS_DEFAULT_ATTRIBUTES,
     
    6868    rtems_build_name( 'T', 'I', 'M', '2' ),
    6969    129,
    70     2048,
     70    RTEMS_MINIMUM_STACK_SIZE,
    7171    RTEMS_DEFAULT_MODES,
    7272    RTEMS_DEFAULT_ATTRIBUTES,
     
    349349  Timer_initialize();
    350350    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    351       (void) rtems_io_initialize( 0, 0, NULL );
     351      (void) rtems_io_initialize( _STUB_major, 0, NULL );
    352352  end_time = Read_timer();
    353353
     
    362362  Timer_initialize();
    363363    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    364       (void) rtems_io_open( 0, 0, NULL );
     364      (void) rtems_io_open( _STUB_major, 0, NULL );
    365365  end_time = Read_timer();
    366366
     
    375375  Timer_initialize();
    376376    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    377       (void) rtems_io_close( 0, 0, NULL );
     377      (void) rtems_io_close( _STUB_major, 0, NULL );
    378378  end_time = Read_timer();
    379379
     
    388388  Timer_initialize();
    389389    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    390       (void) rtems_io_read( 0, 0, NULL );
     390      (void) rtems_io_read( _STUB_major, 0, NULL );
    391391  end_time = Read_timer();
    392392
     
    401401  Timer_initialize();
    402402    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    403       (void) rtems_io_write( 0, 0, NULL );
     403      (void) rtems_io_write( _STUB_major, 0, NULL );
    404404  end_time = Read_timer();
    405405
     
    414414  Timer_initialize();
    415415    for ( index=1 ; index <= OPERATION_COUNT ; index++ )
    416       (void) rtems_io_control( 0, 0, NULL );
     416      (void) rtems_io_control( _STUB_major, 0, NULL );
    417417  end_time = Read_timer();
    418418
  • c/src/tests/tmtests/tm21/task1.c

    rb3ac6a8d r3652ad35  
    3636    rtems_build_name( 'T', 'I', 'M', 'E' ),
    3737    250,
    38     1024,
     38    RTEMS_MINIMUM_STACK_SIZE,
    3939    RTEMS_DEFAULT_MODES,
    4040    RTEMS_DEFAULT_ATTRIBUTES,
     
    6262      index,
    6363      254,
    64       1024,
     64      RTEMS_MINIMUM_STACK_SIZE,
    6565      RTEMS_DEFAULT_MODES,
    6666      RTEMS_DEFAULT_ATTRIBUTES,
     
    7171    status = rtems_message_queue_create(
    7272      index,
    73       OPERATION_COUNT,
     73      1,
    7474      16,
    7575      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm22/task1.c

    rb3ac6a8d r3652ad35  
    5454    rtems_build_name( 'L', 'O', 'W', ' ' ),
    5555    10,
    56     2048,
     56    RTEMS_MINIMUM_STACK_SIZE,
    5757    RTEMS_NO_PREEMPT,
    5858    RTEMS_DEFAULT_ATTRIBUTES,
     
    6767    1,
    6868    11,
    69     1024,
     69    RTEMS_MINIMUM_STACK_SIZE,
    7070    RTEMS_DEFAULT_MODES,
    7171    RTEMS_DEFAULT_ATTRIBUTES,
     
    122122    rtems_build_name( 'H', 'I', 'G', 'H' ),
    123123    5,
    124     2048,
     124    RTEMS_MINIMUM_STACK_SIZE,
    125125    RTEMS_NO_PREEMPT,
    126126    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm23/task1.c

    rb3ac6a8d r3652ad35  
    6363      rtems_build_name( 'T', 'I', 'M', 'E' ),
    6464      priority,
    65       1024,
     65      RTEMS_MINIMUM_STACK_SIZE,
    6666      RTEMS_DEFAULT_MODES,
    6767      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm24/task1.c

    rb3ac6a8d r3652ad35  
    4040    rtems_build_name( 'H', 'I', 'G', 'H' ),
    4141    10,
    42     1024,
     42    RTEMS_MINIMUM_STACK_SIZE,
    4343    RTEMS_DEFAULT_MODES,
    4444    RTEMS_DEFAULT_ATTRIBUTES,
     
    5454      rtems_build_name( 'R', 'E', 'S', 'T' ),
    5555      128,
    56       1024,
     56      RTEMS_MINIMUM_STACK_SIZE,
    5757      RTEMS_DEFAULT_MODES,
    5858      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm25/task1.c

    rb3ac6a8d r3652ad35  
    4949    rtems_build_name( 'L', 'O', 'W', ' ' ),
    5050    254,
    51     1024,
     51    RTEMS_MINIMUM_STACK_SIZE,
    5252    RTEMS_DEFAULT_MODES,
    5353    RTEMS_DEFAULT_ATTRIBUTES,
     
    6363      rtems_build_name( 'T', 'I', 'M', 'E' ),
    6464      128,
    65       1024,
     65      RTEMS_MINIMUM_STACK_SIZE,
    6666      RTEMS_DEFAULT_MODES,
    6767      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm26/task1.c

    rb3ac6a8d r3652ad35  
    7373    rtems_build_name( 'F', 'P', '1', ' ' ),
    7474    201,
    75     2048,
     75    RTEMS_MINIMUM_STACK_SIZE,
    7676    RTEMS_DEFAULT_MODES,
    7777    RTEMS_FLOATING_POINT,
     
    8686    rtems_build_name( 'F', 'P', '2', ' ' ),
    8787    202,
    88     2048,
     88    RTEMS_MINIMUM_STACK_SIZE,
    8989    RTEMS_DEFAULT_MODES,
    9090    RTEMS_FLOATING_POINT,
     
    9999    rtems_build_name( 'L', 'O', 'W', ' ' ),
    100100    200,
    101     2048,
     101    RTEMS_MINIMUM_STACK_SIZE,
    102102    RTEMS_DEFAULT_MODES,
    103103    RTEMS_DEFAULT_ATTRIBUTES,
     
    112112    rtems_build_name( 'M', 'I', 'D', ' ' ),
    113113    128,
    114     2048,
     114    RTEMS_MINIMUM_STACK_SIZE,
    115115    RTEMS_DEFAULT_MODES,
    116116    RTEMS_DEFAULT_ATTRIBUTES,
     
    125125    rtems_build_name( 'H', 'I', 'G', 'H' ),
    126126    5,
    127     2048,
     127    RTEMS_MINIMUM_STACK_SIZE,
    128128    RTEMS_DEFAULT_MODES,
    129129    RTEMS_DEFAULT_ATTRIBUTES,
     
    148148      rtems_build_name( 'N', 'U', 'L', 'L' ),
    149149      254,
    150       1024,
     150      RTEMS_MINIMUM_STACK_SIZE,
    151151      RTEMS_DEFAULT_MODES,
    152152      RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm27/task1.c

    rb3ac6a8d r3652ad35  
    5656    rtems_build_name( 'T', 'A', '1', ' ' ),
    5757    254,
    58     1024,
     58    RTEMS_MINIMUM_STACK_SIZE,
    5959    RTEMS_DEFAULT_MODES,
    6060    RTEMS_DEFAULT_ATTRIBUTES,
     
    6969    rtems_build_name( 'T', 'A', '2', ' ' ),
    7070    254,
    71     1024,
     71    RTEMS_MINIMUM_STACK_SIZE,
    7272    RTEMS_DEFAULT_MODES,
    7373    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm28/task1.c

    rb3ac6a8d r3652ad35  
    3737    rtems_build_name( 'T', 'I', 'M', 'E' ),
    3838    128,
    39     4096,
     39    RTEMS_MINIMUM_STACK_SIZE,
    4040    RTEMS_DEFAULT_MODES,
    4141    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tm29/task1.c

    rb3ac6a8d r3652ad35  
    123123      rtems_build_name( 'T', 'E', 'S', 'T' ),
    124124      128,
    125       1024,
     125      RTEMS_MINIMUM_STACK_SIZE,
    126126      RTEMS_DEFAULT_MODES,
    127127      RTEMS_DEFAULT_ATTRIBUTES,
     
    137137    rtems_build_name( 'L', 'O', 'W', ' ' ),
    138138    200,
    139     2048,
     139    RTEMS_MINIMUM_STACK_SIZE,
    140140    RTEMS_DEFAULT_MODES,
    141141    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tmck/system.h

    rb3ac6a8d r3652ad35  
    3333#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
    3434
    35 #define CONFIGURE_MAXIMUM_TASKS              2111
     35#define CONFIGURE_MAXIMUM_TASKS              2
    3636#define CONFIGURE_TICKS_PER_TIMESLICE        0
    3737 
  • c/src/tests/tmtests/tmck/task1.c

    rb3ac6a8d r3652ad35  
    5151    1,
    5252    5,
    53     1024,
     53    RTEMS_MINIMUM_STACK_SIZE,
    5454    RTEMS_DEFAULT_MODES,
    5555    RTEMS_DEFAULT_ATTRIBUTES,
  • c/src/tests/tmtests/tmoverhd/testtask.c

    rb3ac6a8d r3652ad35  
    3838    rtems_build_name( 'T', 'A', '1', ' ' ),
    3939    254,
    40     2048,
     40    RTEMS_MINIMUM_STACK_SIZE,
    4141    RTEMS_DEFAULT_MODES,
    4242    RTEMS_DEFAULT_ATTRIBUTES,
     
    130130               name,
    131131               in_priority,
    132                2048,
     132               RTEMS_MINIMUM_STACK_SIZE,
    133133               RTEMS_DEFAULT_MODES,
    134134               RTEMS_DEFAULT_ATTRIBUTES,
  • cpukit/libmisc/monitor/mon-object.c

    rb3ac6a8d r3652ad35  
    131131#warning "TONY... FIX ME!!!!!"
    132132#if defined(hppa1_1)
    133 #error "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
     133#warning "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
    134134#endif
    135135        id = _Objects_Build_id(0, default_node, rtems_get_index(id));
  • cpukit/libmisc/monitor/mon-queue.c

    rb3ac6a8d r3652ad35  
    1919
    2020    canonical_queue->attributes = rtems_queue->attribute_set;
    21     canonical_queue->maximum_message_size = rtems_queue->maximum_message_size;
    22     canonical_queue->maximum_pending_messages = rtems_queue->maximum_pending_messages;
    23     canonical_queue->number_of_pending_messages = rtems_queue->number_of_pending_messages;
     21    canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
     22    canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
     23    canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
    2424}
    2525
  • cpukit/rtems/include/rtems/rtems/message.h

    rb3ac6a8d r3652ad35  
    4040#include <rtems/rtems/attr.h>
    4141#include <rtems/core/threadq.h>
    42 
    43 /*
    44  *  The following defines the data types needed to manipulate
    45  *  the contents of message buffers.
    46  *  Since msgs are variable length we just make a ptr to 1.
    47  */
    48 
    49 typedef struct {
    50     unsigned32  size;
    51 
    52 #ifndef __cplusplus
    53                                /* NOTE:   [0] is gcc specific,
    54                                 *   but specifically disallowed by ANSI STD C++
    55                                 * g++ warns about it, so we #ifdef it out to
    56                                 * get rid of warnings when compiled by g++.
    57                                 */
    58     unsigned32  buffer[0];
    59 #endif
    60 
    61 } Message_queue_Buffer;
    62 
    63 /*
    64  *  The following records define the organization of a message
    65  *  buffer.
    66  */
    67 
    68 typedef struct {
    69   Chain_Node           Node;
    70   Message_queue_Buffer Contents;
    71 }   Message_queue_Buffer_control;
    72 
    73 /*
    74  *  The following records define the control block used to manage
    75  *  each message queue.
    76  */
    77 
    78 typedef struct {
    79   Objects_Control      Object;
    80   Thread_queue_Control Wait_queue;
    81   rtems_attribute      attribute_set;
    82   unsigned32           maximum_pending_messages;
    83   unsigned32           number_of_pending_messages;
    84   unsigned32           maximum_message_size;
    85   Chain_Control        Pending_messages;
    86   Message_queue_Buffer *message_buffers;
    87   Chain_Control        Inactive_messages;
    88 }   Message_queue_Control;
    89 
    90 /*
    91  *  The following defines the information control block used to
    92  *  manage this class of objects.
    93  */
    94 
    95 EXTERN Objects_Information  _Message_queue_Information;
     42#include <rtems/core/coremsg.h>
    9643
    9744/*
     
    10047 *  in a send or urgent fashion.
    10148 */
    102 
     49 
    10350typedef enum {
    10451  MESSAGE_QUEUE_SEND_REQUEST   = 0,
    10552  MESSAGE_QUEUE_URGENT_REQUEST = 1
    10653}  Message_queue_Submit_types;
     54
     55/*
     56 *  The following records define the control block used to manage
     57 *  each message queue.
     58 */
     59
     60typedef struct {
     61  Objects_Control             Object;
     62  rtems_attribute             attribute_set;
     63  CORE_message_queue_Control  message_queue;
     64}   Message_queue_Control;
     65
     66/*
     67 *  The following defines the information control block used to
     68 *  manage this class of objects.
     69 */
     70
     71EXTERN Objects_Information  _Message_queue_Information;
    10772
    10873/*
     
    256221  Objects_Id            id,
    257222  void                 *buffer,
    258   unsigned32           *size_p,
     223  unsigned32           *size,
    259224  unsigned32            option_set,
    260225  rtems_interval        timeout
     
    278243
    279244/*
    280  *  _Message_queue_Copy_buffer
    281  *
    282  *  DESCRIPTION:
    283  *
    284  *  This routine copies the contents of the source message buffer
    285  *  to the destination message buffer.
    286  */
    287 
    288 STATIC INLINE void _Message_queue_Copy_buffer (
    289   void      *source,
    290   void      *destination,
    291   unsigned32 size
    292 );
    293 
    294 /*
    295  *  _Message_queue_Seize
    296  *
    297  *  DESCRIPTION:
    298  *
    299  *  This routine attempts to receive a message from the_message_queue.
    300  *  If a message is available or if the RTEMS_NO_WAIT option is enabled in
    301  *  option_set, then the routine returns.  Otherwise, the calling task
    302  *  is blocked until a message is available.  If a message is returned
    303  *  to the task, then buffer will contain its contents.
    304  */
    305 
    306 boolean _Message_queue_Seize(
    307   Message_queue_C