Changeset 3652ad35 in rtems
- Timestamp:
- 09/19/95 14:53:29 (28 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 38ffa0c
- Parents:
- b3ac6a8d
- Files:
-
- 11 added
- 217 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/rtems/headers/message.h
rb3ac6a8d r3652ad35 40 40 #include <rtems/rtems/attr.h> 41 41 #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> 96 43 97 44 /* … … 100 47 * in a send or urgent fashion. 101 48 */ 102 49 103 50 typedef enum { 104 51 MESSAGE_QUEUE_SEND_REQUEST = 0, 105 52 MESSAGE_QUEUE_URGENT_REQUEST = 1 106 53 } Message_queue_Submit_types; 54 55 /* 56 * The following records define the control block used to manage 57 * each message queue. 58 */ 59 60 typedef 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 71 EXTERN Objects_Information _Message_queue_Information; 107 72 108 73 /* … … 256 221 Objects_Id id, 257 222 void *buffer, 258 unsigned32 *size _p,223 unsigned32 *size, 259 224 unsigned32 option_set, 260 225 rtems_interval timeout … … 278 243 279 244 /* 280 * _Message_queue_Copy_buffer281 *282 * DESCRIPTION:283 *284 * This routine copies the contents of the source message buffer285 * to the destination message buffer.286 */287 288 STATIC INLINE void _Message_queue_Copy_buffer (289 void *source,290 void *destination,291 unsigned32 size292 );293 294 /*295 * _Message_queue_Seize296 *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 in301 * option_set, then the routine returns. Otherwise, the calling task302 * is blocked until a message is available. If a message is returned303 * 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_p311 );312 313 /*314 * _Message_queue_Flush_support315 *316 * DESCRIPTION:317 *318 * This routine flushes all outstanding messages and returns319 * them to the inactive message chain.320 */321 322 unsigned32 _Message_queue_Flush_support(323 Message_queue_Control *the_message_queue324 );325 326 /*327 245 * _Message_queue_Submit 328 246 * 329 247 * DESCRIPTION: 330 248 * 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 335 257 rtems_status_code _Message_queue_Submit( 336 258 Objects_Id id, … … 338 260 unsigned32 size, 339 261 Message_queue_Submit_types submit_type 340 );341 342 /*343 * _Message_queue_Allocate_message_buffer344 *345 * DESCRIPTION:346 *347 * This function allocates a message buffer from the inactive348 * message buffer chain.349 */350 351 STATIC INLINE Message_queue_Buffer_control *352 _Message_queue_Allocate_message_buffer (353 Message_queue_Control *the_message_queue354 );355 356 /*357 * _Message_queue_Free_message_buffer358 *359 * DESCRIPTION:360 *361 * This routine frees a message buffer to the inactive362 * 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_message368 );369 370 /*371 * _Message_queue_Get_pending_message372 *373 * DESCRIPTION:374 *375 * This function removes the first message from the_message_queue376 * and returns a pointer to it.377 */378 379 STATIC INLINE380 Message_queue_Buffer_control *_Message_queue_Get_pending_message (381 Message_queue_Control *the_message_queue382 );383 384 /*385 * _Message_queue_Append386 *387 * DESCRIPTION:388 *389 * This routine places the_message at the rear of the outstanding390 * 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_message396 );397 398 /*399 * _Message_queue_Prepend400 *401 * DESCRIPTION:402 *403 * This routine places the_message at the rear of the outstanding404 * 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_message410 262 ); 411 263 … … 470 322 ); 471 323 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 333 rtems_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 348 void _Message_queue_Core_message_queue_mp_support ( 349 Thread_Control *the_thread, 350 Objects_Id id 351 ); 352 472 353 #include <rtems/rtems/message.inl> 473 354 #include <rtems/rtems/msgmp.h> -
c/src/exec/rtems/headers/msgmp.h
rb3ac6a8d r3652ad35 64 64 unsigned32 size; 65 65 unsigned32 pad0; 66 Message_queue_BufferBuffer;66 CORE_message_queue_Buffer Buffer; 67 67 } Message_queue_MP_Packet; 68 68 -
c/src/exec/rtems/include/rtems/rtems/message.h
rb3ac6a8d r3652ad35 40 40 #include <rtems/rtems/attr.h> 41 41 #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> 96 43 97 44 /* … … 100 47 * in a send or urgent fashion. 101 48 */ 102 49 103 50 typedef enum { 104 51 MESSAGE_QUEUE_SEND_REQUEST = 0, 105 52 MESSAGE_QUEUE_URGENT_REQUEST = 1 106 53 } Message_queue_Submit_types; 54 55 /* 56 * The following records define the control block used to manage 57 * each message queue. 58 */ 59 60 typedef 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 71 EXTERN Objects_Information _Message_queue_Information; 107 72 108 73 /* … … 256 221 Objects_Id id, 257 222 void *buffer, 258 unsigned32 *size _p,223 unsigned32 *size, 259 224 unsigned32 option_set, 260 225 rtems_interval timeout … … 278 243 279 244 /* 280 * _Message_queue_Copy_buffer281 *282 * DESCRIPTION:283 *284 * This routine copies the contents of the source message buffer285 * to the destination message buffer.286 */287 288 STATIC INLINE void _Message_queue_Copy_buffer (289 void *source,290 void *destination,291 unsigned32 size292 );293 294 /*295 * _Message_queue_Seize296 *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 in301 * option_set, then the routine returns. Otherwise, the calling task302 * is blocked until a message is available. If a message is returned303 * 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_p311 );312 313 /*314 * _Message_queue_Flush_support315 *316 * DESCRIPTION:317 *318 * This routine flushes all outstanding messages and returns319 * them to the inactive message chain.320 */321 322 unsigned32 _Message_queue_Flush_support(323 Message_queue_Control *the_message_queue324 );325 326 /*327 245 * _Message_queue_Submit 328 246 * 329 247 * DESCRIPTION: 330 248 * 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 335 257 rtems_status_code _Message_queue_Submit( 336 258 Objects_Id id, … … 338 260 unsigned32 size, 339 261 Message_queue_Submit_types submit_type 340 );341 342 /*343 * _Message_queue_Allocate_message_buffer344 *345 * DESCRIPTION:346 *347 * This function allocates a message buffer from the inactive348 * message buffer chain.349 */350 351 STATIC INLINE Message_queue_Buffer_control *352 _Message_queue_Allocate_message_buffer (353 Message_queue_Control *the_message_queue354 );355 356 /*357 * _Message_queue_Free_message_buffer358 *359 * DESCRIPTION:360 *361 * This routine frees a message buffer to the inactive362 * 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_message368 );369 370 /*371 * _Message_queue_Get_pending_message372 *373 * DESCRIPTION:374 *375 * This function removes the first message from the_message_queue376 * and returns a pointer to it.377 */378 379 STATIC INLINE380 Message_queue_Buffer_control *_Message_queue_Get_pending_message (381 Message_queue_Control *the_message_queue382 );383 384 /*385 * _Message_queue_Append386 *387 * DESCRIPTION:388 *389 * This routine places the_message at the rear of the outstanding390 * 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_message396 );397 398 /*399 * _Message_queue_Prepend400 *401 * DESCRIPTION:402 *403 * This routine places the_message at the rear of the outstanding404 * 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_message410 262 ); 411 263 … … 470 322 ); 471 323 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 333 rtems_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 348 void _Message_queue_Core_message_queue_mp_support ( 349 Thread_Control *the_thread, 350 Objects_Id id 351 ); 352 472 353 #include <rtems/rtems/message.inl> 473 354 #include <rtems/rtems/msgmp.h> -
c/src/exec/rtems/include/rtems/rtems/msgmp.h
rb3ac6a8d r3652ad35 64 64 unsigned32 size; 65 65 unsigned32 pad0; 66 Message_queue_BufferBuffer;66 CORE_message_queue_Buffer Buffer; 67 67 } Message_queue_MP_Packet; 68 68 -
c/src/exec/rtems/inline/message.inl
rb3ac6a8d r3652ad35 19 19 20 20 #include <rtems/core/wkspace.h> 21 22 /*PAGE23 *24 * _Message_queue_Copy_buffer25 *26 */27 28 STATIC INLINE void _Message_queue_Copy_buffer (29 void *source,30 void *destination,31 unsigned32 size32 )33 {34 memcpy(destination, source, size);35 }36 37 /*PAGE38 *39 * _Message_queue_Allocate_message_buffer40 *41 */42 43 STATIC INLINE Message_queue_Buffer_control *44 _Message_queue_Allocate_message_buffer (45 Message_queue_Control *the_message_queue46 )47 {48 return (Message_queue_Buffer_control *)49 _Chain_Get( &the_message_queue->Inactive_messages );50 }51 52 /*PAGE53 *54 * _Message_queue_Free_message_buffer55 *56 */57 58 STATIC INLINE void _Message_queue_Free_message_buffer (59 Message_queue_Control *the_message_queue,60 Message_queue_Buffer_control *the_message61 )62 {63 _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );64 }65 66 /*PAGE67 *68 * _Message_queue_Get_pending_message69 *70 */71 72 STATIC INLINE73 Message_queue_Buffer_control *_Message_queue_Get_pending_message (74 Message_queue_Control *the_message_queue75 )76 {77 return (Message_queue_Buffer_control *)78 _Chain_Get_unprotected( &the_message_queue->Pending_messages );79 }80 81 /*PAGE82 *83 * _Message_queue_Append84 *85 */86 87 STATIC INLINE void _Message_queue_Append (88 Message_queue_Control *the_message_queue,89 Message_queue_Buffer_control *the_message90 )91 {92 _Chain_Append( &the_message_queue->Pending_messages, &the_message->Node );93 }94 95 /*PAGE96 *97 * _Message_queue_Prepend98 *99 */100 101 STATIC INLINE void _Message_queue_Prepend (102 Message_queue_Control *the_message_queue,103 Message_queue_Buffer_control *the_message104 )105 {106 _Chain_Prepend(107 &the_message_queue->Pending_messages,108 &the_message->Node109 );110 }111 21 112 22 /*PAGE … … 134 44 ) 135 45 { 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 141 46 _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 142 47 } -
c/src/exec/rtems/inline/rtems/rtems/message.inl
rb3ac6a8d r3652ad35 19 19 20 20 #include <rtems/core/wkspace.h> 21 22 /*PAGE23 *24 * _Message_queue_Copy_buffer25 *26 */27 28 STATIC INLINE void _Message_queue_Copy_buffer (29 void *source,30 void *destination,31 unsigned32 size32 )33 {34 memcpy(destination, source, size);35 }36 37 /*PAGE38 *39 * _Message_queue_Allocate_message_buffer40 *41 */42 43 STATIC INLINE Message_queue_Buffer_control *44 _Message_queue_Allocate_message_buffer (45 Message_queue_Control *the_message_queue46 )47 {48 return (Message_queue_Buffer_control *)49 _Chain_Get( &the_message_queue->Inactive_messages );50 }51 52 /*PAGE53 *54 * _Message_queue_Free_message_buffer55 *56 */57 58 STATIC INLINE void _Message_queue_Free_message_buffer (59 Message_queue_Control *the_message_queue,60 Message_queue_Buffer_control *the_message61 )62 {63 _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );64 }65 66 /*PAGE67 *68 * _Message_queue_Get_pending_message69 *70 */71 72 STATIC INLINE73 Message_queue_Buffer_control *_Message_queue_Get_pending_message (74 Message_queue_Control *the_message_queue75 )76 {77 return (Message_queue_Buffer_control *)78 _Chain_Get_unprotected( &the_message_queue->Pending_messages );79 }80 81 /*PAGE82 *83 * _Message_queue_Append84 *85 */86 87 STATIC INLINE void _Message_queue_Append (88 Message_queue_Control *the_message_queue,89 Message_queue_Buffer_control *the_message90 )91 {92 _Chain_Append( &the_message_queue->Pending_messages, &the_message->Node );93 }94 95 /*PAGE96 *97 * _Message_queue_Prepend98 *99 */100 101 STATIC INLINE void _Message_queue_Prepend (102 Message_queue_Control *the_message_queue,103 Message_queue_Buffer_control *the_message104 )105 {106 _Chain_Prepend(107 &the_message_queue->Pending_messages,108 &the_message->Node109 );110 }111 21 112 22 /*PAGE … … 134 44 ) 135 45 { 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 141 46 _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 142 47 } -
c/src/exec/rtems/macros/message.inl
rb3ac6a8d r3652ad35 20 20 /*PAGE 21 21 * 22 * _Message_queue_Copy_buffer23 */24 25 #define _Message_queue_Copy_buffer( _source, _destination, _size ) \26 memcpy( _destination, _source, _size)27 28 /*PAGE29 *30 * _Message_queue_Allocate_message_buffer31 *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 /*PAGE39 *40 * _Message_queue_Free_message_buffer41 *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 /*PAGE51 *52 * _Message_queue_Get_pending_message53 *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 /*PAGE61 *62 * _Message_queue_Append63 *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 /*PAGE71 *72 * _Message_queue_Prepend73 *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 /*PAGE81 *82 22 * _Message_queue_Is_null 83 23 * … … 94 34 95 35 #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 ) 109 37 110 38 /*PAGE -
c/src/exec/rtems/macros/rtems/rtems/message.inl
rb3ac6a8d r3652ad35 20 20 /*PAGE 21 21 * 22 * _Message_queue_Copy_buffer23 */24 25 #define _Message_queue_Copy_buffer( _source, _destination, _size ) \26 memcpy( _destination, _source, _size)27 28 /*PAGE29 *30 * _Message_queue_Allocate_message_buffer31 *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 /*PAGE39 *40 * _Message_queue_Free_message_buffer41 *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 /*PAGE51 *52 * _Message_queue_Get_pending_message53 *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 /*PAGE61 *62 * _Message_queue_Append63 *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 /*PAGE71 *72 * _Message_queue_Prepend73 *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 /*PAGE81 *82 22 * _Message_queue_Is_null 83 23 * … … 94 34 95 35 #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 ) 109 37 110 38 /*PAGE -
c/src/exec/rtems/src/msg.c
rb3ac6a8d r3652ad35 15 15 16 16 #include <rtems/system.h> 17 #include <rtems/rtems/status.h> 18 #include <rtems/rtems/attr.h> 17 #include <rtems/sysstate.h> 19 18 #include <rtems/core/chain.h> 20 19 #include <rtems/core/isr.h> 21 #include <rtems/ rtems/message.h>20 #include <rtems/core/coremsg.h> 22 21 #include <rtems/core/object.h> 23 #include <rtems/rtems/options.h>24 22 #include <rtems/core/states.h> 25 #include <rtems/rtems/support.h>26 23 #include <rtems/core/thread.h> 27 24 #include <rtems/core/wkspace.h> 28 25 #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> 30 31 31 32 /*PAGE … … 73 74 * 74 75 * 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 75 84 */ 76 85 77 86 Message_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 125 94 } 126 95 … … 133 102 * 134 103 * Input parameters: 135 * name - user defined queue name136 * count - maximum message and reserved buffer count104 * name - user defined queue name 105 * count - maximum message and reserved buffer count 137 106 * max_message_size - maximum size of each message 138 * attribute_set - process method139 * id - pointer to queue107 * attribute_set - process method 108 * id - pointer to queue 140 109 * 141 110 * Output parameters: … … 154 123 { 155 124 register Message_queue_Control *the_message_queue; 125 CORE_message_queue_Attributes the_message_queue_attributes; 126 boolean is_global; 156 127 157 128 if ( !rtems_is_name_valid( name ) ) 158 129 return RTEMS_INVALID_NAME; 159 130 160 if ( _Attributes_Is_global( attribute_set) &&131 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && 161 132 !_System_state_Is_multiprocessing ) 162 133 return RTEMS_MP_NOT_CONFIGURED; … … 175 146 */ 176 147 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 182 151 #endif 183 152 184 153 _Thread_Disable_dispatch(); /* protects object pointer */ 185 154 186 the_message_queue = _Message_queue_Allocate( count, max_message_size);155 the_message_queue = _Message_queue_Allocate( count, max_message_size ); 187 156 188 157 if ( !the_message_queue ) { … … 191 160 } 192 161 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 ) ) ) { 196 165 _Message_queue_Free( the_message_queue ); 197 166 _Thread_Enable_dispatch(); … … 199 168 } 200 169 201 the_message_queue->maximum_pending_messages = count;202 203 170 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 } 217 194 218 195 _Objects_Open( … … 224 201 *id = the_message_queue->Object.id; 225 202 226 if ( _Attributes_Is_global( attribute_set ))203 if ( is_global ) 227 204 _Message_queue_MP_Send_process_packet( 228 205 MESSAGE_QUEUE_MP_ANNOUNCE_CREATE, … … 305 282 &the_message_queue->Object ); 306 283 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 ); 315 289 316 290 _Message_queue_Free( the_message_queue ); … … 347 321 * id - pointer to message queue 348 322 * buffer - pointer to message buffer 323 * size - size of message to sent urgently 349 324 * 350 325 * Output parameters: … … 359 334 ) 360 335 { 361 return _Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_SEND_REQUEST);336 return( _Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_SEND_REQUEST) ); 362 337 } 363 338 … … 372 347 * id - pointer to message queue 373 348 * buffer - pointer to message buffer 349 * size - size of message to sent urgently 374 350 * 375 351 * Output parameters: 376 352 * RTEMS_SUCCESSFUL - if successful 377 * error code - if unsuccessful353 * error code - if unsuccessful 378 354 */ 379 355 … … 384 360 ) 385 361 { 386 return _Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_URGENT_REQUEST);362 return(_Message_queue_Submit(id, buffer, size, MESSAGE_QUEUE_URGENT_REQUEST)); 387 363 } 388 364 … … 397 373 * id - pointer to message queue 398 374 * buffer - pointer to message buffer 375 * size - size of message to broadcast 399 376 * count - pointer to area to store number of threads made ready 400 377 * 401 378 * Output parameters: 402 379 * count - number of threads made ready 403 * RTEMS_SUCCESSFUL - if successful380 * RTEMS_SUCCESSFUL - if successful 404 381 * error code - if unsuccessful 405 382 */ … … 414 391 register Message_queue_Control *the_message_queue; 415 392 Objects_Locations location; 416 Thread_Control *the_thread; 417 unsigned32 number_broadcasted; 393 CORE_message_queue_Status core_status; 418 394 419 395 the_message_queue = _Message_queue_Get( id, &location ); … … 435 411 436 412 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 467 422 _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 */ 475 428 } 476 429 … … 485 438 * id - queue id 486 439 * buffer - pointer to message buffer 440 * size - size of message receive 487 441 * option_set - options on receive 488 442 * timeout - number of ticks to wait … … 490 444 * Output parameters: 491 445 * RTEMS_SUCCESSFUL - if successful 492 * error code 446 * error code - if unsuccessful 493 447 */ 494 448 … … 496 450 Objects_Id id, 497 451 void *buffer, 498 unsigned32 *size _p,452 unsigned32 *size, 499 453 unsigned32 option_set, 500 454 rtems_interval timeout … … 503 457 register Message_queue_Control *the_message_queue; 504 458 Objects_Locations location; 459 boolean wait; 505 460 506 461 the_message_queue = _Message_queue_Get( id, &location ); … … 515 470 id, 516 471 buffer, 517 size _p,472 size, 518 473 option_set, 519 474 timeout … … 521 476 522 477 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 ); 530 491 _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 532 495 } 533 496 … … 573 536 id, 574 537 0, /* buffer not used */ 575 0, /* size _p*/538 0, /* size */ 576 539 0, /* option_set not used */ 577 540 MPCI_DEFAULT_TIMEOUT … … 579 542 580 543 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 ); 585 545 _Thread_Enable_dispatch(); 586 546 return RTEMS_SUCCESSFUL; … … 592 552 /*PAGE 593 553 * 594 * _Message_queue_Seize595 *596 * This kernel routine dequeues a message, copies the message buffer to597 * a given destination buffer, and frees the message buffer to the598 * inactive message pool.599 *600 * Input parameters:601 * the_message_queue - pointer to message queue602 * option_set - options on receive603 * the_buffer - pointer to message buffer to be filled604 *605 * Output parameters:606 * TRUE - if message received or RTEMS_NO_WAIT and no message607 * FALSE - if thread is to block608 *609 * NOTE: Dependent on BUFFER_LENGTH610 *611 * INTERRUPT LATENCY:612 * available613 * wait614 */615 616 boolean _Message_queue_Seize(617 Message_queue_Control *the_message_queue,618 rtems_option option_set,619 void *buffer,620 unsigned32 *size_p621 )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 /*PAGE658 *659 * _Message_queue_Flush_support660 *661 * This message manager routine removes all messages from a message queue662 * and returns them to the inactive message pool.663 *664 * Input parameters:665 * the_message_queue - pointer to message queue666 *667 * Output parameters:668 * returns - number of messages placed on inactive chain669 *670 * INTERRUPT LATENCY:671 * only case672 */673 674 unsigned32 _Message_queue_Flush_support(675 Message_queue_Control *the_message_queue676 )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 /*PAGE704 *705 554 * _Message_queue_Submit 706 555 * 707 * This routine implements the directives q_send and q_urgent. It708 * processes a message that is to be submitted to the designated709 * message queue. The message will either be processed as a send710 * send message which it will be inserted at the rear of the queue711 * or it will be processed as an urgent message which will be inserted712 * 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. 713 562 * 714 563 * Input parameters: … … 730 579 ) 731 580 { 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; 736 584 737 585 the_message_queue = _Message_queue_Get( id, &location ); … … 767 615 768 616 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 size786 );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_thread796 );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 away806 */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 825 617 switch ( submit_type ) { 826 618 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 ); 828 626 break; 829 627 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 ); 831 635 break; 636 default: 637 core_status = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 638 return RTEMS_INTERNAL_ERROR; /* should never get here */ 832 639 } 833 640 834 641 _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 661 rtems_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: 835 667 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 702 void _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 134 134 if (buffer) { 135 135 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 ); 139 141 } 140 142 … … 311 313 the_packet->size; 312 314 313 _ Message_queue_Copy_buffer(315 _CORE_message_queue_Copy_buffer( 314 316 the_packet->Buffer.buffer, 315 317 the_thread->Wait.return_argument, -
c/src/exec/rtems/src/sem.c
rb3ac6a8d r3652ad35 117 117 118 118 if ( !rtems_is_name_valid( name ) ) 119 return ( RTEMS_INVALID_NAME );119 return RTEMS_INVALID_NAME; 120 120 121 121 if ( _Attributes_Is_global( attribute_set ) ) { 122 122 123 123 if ( !_System_state_Is_multiprocessing ) 124 return ( RTEMS_MP_NOT_CONFIGURED );124 return RTEMS_MP_NOT_CONFIGURED; 125 125 126 126 if ( _Attributes_Is_inherit_priority( attribute_set ) ) 127 return ( RTEMS_NOT_DEFINED );127 return RTEMS_NOT_DEFINED; 128 128 129 129 } else if ( _Attributes_Is_inherit_priority( attribute_set ) ) { … … 131 131 if ( ! ( _Attributes_Is_binary_semaphore( attribute_set ) && 132 132 _Attributes_Is_priority( attribute_set ) ) ) 133 return ( RTEMS_NOT_DEFINED );133 return RTEMS_NOT_DEFINED; 134 134 135 135 } 136 136 137 137 if ( _Attributes_Is_binary_semaphore( attribute_set ) && ( count > 1 ) ) 138 return ( RTEMS_INVALID_NUMBER );138 return RTEMS_INVALID_NUMBER; 139 139 140 140 _Thread_Disable_dispatch(); /* prevents deletion */ … … 144 144 if ( !the_semaphore ) { 145 145 _Thread_Enable_dispatch(); 146 return ( RTEMS_TOO_MANY );146 return RTEMS_TOO_MANY; 147 147 } 148 148 … … 152 152 _Semaphore_Free( the_semaphore ); 153 153 _Thread_Enable_dispatch(); 154 return ( RTEMS_TOO_MANY );154 return RTEMS_TOO_MANY; 155 155 } 156 156 … … 211 211 ); 212 212 _Thread_Enable_dispatch(); 213 return ( RTEMS_SUCCESSFUL );213 return RTEMS_SUCCESSFUL; 214 214 } 215 215 … … 271 271 switch ( location ) { 272 272 case OBJECTS_ERROR: 273 return ( RTEMS_INVALID_ID );273 return RTEMS_INVALID_ID; 274 274 case OBJECTS_REMOTE: 275 275 _Thread_Dispatch(); 276 return ( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );276 return RTEMS_ILLEGAL_ON_REMOTE_OBJECT; 277 277 case OBJECTS_LOCAL: 278 278 if ( _Attributes_Is_binary_semaphore( the_semaphore->attribute_set) ) { 279 279 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) ) { 280 280 _Thread_Enable_dispatch(); 281 return ( RTEMS_RESOURCE_IN_USE );281 return RTEMS_RESOURCE_IN_USE; 282 282 } 283 283 else … … 311 311 } 312 312 _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 */ 317 317 } 318 318 … … 346 346 switch ( location ) { 347 347 case OBJECTS_ERROR: 348 return ( RTEMS_INVALID_ID );348 return RTEMS_INVALID_ID; 349 349 case OBJECTS_REMOTE: 350 350 return _Semaphore_MP_Send_request_packet( … … 368 368 ); 369 369 _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 ); 372 372 } else { 373 373 _CORE_semaphore_Seize( … … 378 378 ); 379 379 _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 ); 382 382 } 383 383 } 384 384 385 return ( RTEMS_INTERNAL_ERROR ); /* unreached - only to remove warnings */385 return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ 386 386 } 387 387 … … 412 412 switch ( location ) { 413 413 case OBJECTS_ERROR: 414 return ( RTEMS_INVALID_ID );414 return RTEMS_INVALID_ID; 415 415 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 423 421 ); 424 422 case OBJECTS_LOCAL: … … 430 428 ); 431 429 _Thread_Enable_dispatch(); 432 return ( _Semaphore_Translate_core_mutex_return_code( mutex_status ));430 return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 433 431 } 434 432 else … … 439 437 ); 440 438 _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 */ 446 444 } 447 445 … … 464 462 switch ( the_mutex_status ) { 465 463 case CORE_MUTEX_STATUS_SUCCESSFUL: 466 return ( RTEMS_SUCCESSFUL );464 return RTEMS_SUCCESSFUL; 467 465 case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT: 468 return ( RTEMS_UNSATISFIED );466 return RTEMS_UNSATISFIED; 469 467 case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED: 470 return ( RTEMS_INTERNAL_ERROR );468 return RTEMS_INTERNAL_ERROR; 471 469 case CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE: 472 return ( RTEMS_NOT_OWNER_OF_RESOURCE );470 return RTEMS_NOT_OWNER_OF_RESOURCE; 473 471 case CORE_MUTEX_WAS_DELETED: 474 return ( RTEMS_OBJECT_WAS_DELETED );472 return RTEMS_OBJECT_WAS_DELETED; 475 473 case CORE_MUTEX_TIMEOUT: 476 return ( RTEMS_TIMEOUT );474 return RTEMS_TIMEOUT; 477 475 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 */ 486 479 } 487 480 … … 504 497 switch ( the_semaphore_status ) { 505 498 case CORE_SEMAPHORE_STATUS_SUCCESSFUL: 506 return ( RTEMS_SUCCESSFUL );499 return RTEMS_SUCCESSFUL; 507 500 case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: 508 return ( RTEMS_UNSATISFIED );501 return RTEMS_UNSATISFIED; 509 502 case CORE_SEMAPHORE_WAS_DELETED: 510 return ( RTEMS_OBJECT_WAS_DELETED );503 return RTEMS_OBJECT_WAS_DELETED; 511 504 case CORE_SEMAPHORE_TIMEOUT: 512 return ( RTEMS_TIMEOUT );505 return RTEMS_TIMEOUT; 513 506 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 */ 523 510 } 524 511 -
c/src/exec/rtems/src/tasks.c
rb3ac6a8d r3652ad35 115 115 116 116 _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; 124 118 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 ); 137 132 138 133 } -
c/src/exec/sapi/headers/confdefs.h
rb3ac6a8d r3652ad35 237 237 #endif 238 238 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 */ 240 258 241 259 #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 244 327 #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) 246 341 #endif 247 342 -
c/src/exec/sapi/include/confdefs.h
rb3ac6a8d r3652ad35 237 237 #endif 238 238 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 */ 240 258 241 259 #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 244 327 #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) 246 341 #endif 247 342 -
c/src/exec/score/cpu/hppa1.1/cpu.c
rb3ac6a8d r3652ad35 194 194 hppa_external_interrupt_initialize(void) 195 195 { 196 hppa_rtems_isr_entry ignore ;196 hppa_rtems_isr_entry ignore = 0; 197 197 198 198 /* mark them all unused */ … … 202 202 203 203 /* 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 ); 206 209 } 207 210 -
c/src/exec/score/cpu/hppa1.1/cpu_asm.s
rb3ac6a8d r3652ad35 25 25 # suitability of this software for any purpose. 26 26 # 27 *$Id$27 # $Id$ 28 28 # 29 29 -
c/src/exec/score/cpu/hppa1.1/hppa.h
rb3ac6a8d r3652ad35 637 637 638 638 #define EMIT_SET_CONTROL(name, reg) \ 639 static __inline__ unsigned int\639 static __inline__ void \ 640 640 set_ ## name (unsigned int new_value) \ 641 641 { \ -
c/src/exec/score/cpu/hppa1.1/rtems.s
rb3ac6a8d r3652ad35 15 15 */ 16 16 17 #include <rtems/ hppa.h>17 #include <rtems/core/hppa.h> 18 18 #include <rtems/core/cpu_asm.h> 19 19 -
c/src/exec/score/cpu/i386/cpu.c
rb3ac6a8d r3652ad35 35 35 { 36 36 register unsigned16 fp_status asm ("ax"); 37 register unsigned8*fp_context;37 register void *fp_context; 38 38 39 39 _CPU_Table = *cpu_table; … … 57 57 if ( fp_status == 0 ) { 58 58 59 fp_context = _CPU_Null_fp_context;59 fp_context = &_CPU_Null_fp_context; 60 60 61 61 asm volatile( "fsave (%0)" : "=r" (fp_context) -
c/src/exec/score/cpu/i386/cpu.h
rb3ac6a8d r3652ad35 148 148 /* 149 149 * 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 155 153 156 154 /* … … 233 231 #define _CPU_Context_Initialize_fp( _fp_area ) \ 234 232 { \ 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); \ 237 235 unsigned32 _index; \ 238 236 \ -
c/src/exec/score/cpu/i386/i386.h
rb3ac6a8d r3652ad35 171 171 register unsigned32 _eflags = 0; \ 172 172 \ 173 asm volatile ( "push %0; \174 pop f" \173 asm volatile ( "pushf ; \ 174 pop %0" \ 175 175 : "=r" ((_eflags)) : "0" ((_eflags)) \ 176 176 ); \ -
c/src/exec/score/cpu/i960/cpu.h
rb3ac6a8d r3652ad35 180 180 181 181 #define CPU_SYSTEM_INITIALIZATION_THREAD_EXTRA_STACK \ 182 ( 4096 -CPU_STACK_MINIMUM_SIZE)182 (CPU_STACK_MINIMUM_SIZE) 183 183 184 184 /* … … 194 194 */ 195 195 196 #define CPU_STACK_MINIMUM_SIZE 1024196 #define CPU_STACK_MINIMUM_SIZE 2048 197 197 198 198 /* -
c/src/exec/score/cpu/m68k/cpu.h
rb3ac6a8d r3652ad35 178 178 /* 179 179 * 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 185 183 186 184 /* -
c/src/exec/score/cpu/unix/cpu.c
rb3ac6a8d r3652ad35 1 1 /* 2 * HP PA-RISC CPUDependent Source2 * UNIX Simulator Dependent Source 3 3 * 4 4 * … … 19 19 #include <rtems/system.h> 20 20 #include <rtems/core/isr.h> 21 #include <rtems/core/interr.h> 21 22 22 23 #include <stdio.h> … … 170 171 171 172 _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 177 176 ); 178 177 179 178 _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 185 182 ); 186 187 183 } 188 184 … … 192 188 */ 193 189 190 sigset_t GET_old_mask; 191 194 192 unsigned32 _CPU_ISR_Get_level( void ) 195 193 { 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; 209 205 } 210 206 … … 384 380 source = _CPU_Context_Default_with_ISRs_disabled.regs; 385 381 386 memcpy(_the_context, source, sizeof( jmp_buf));382 memcpy(_the_context, source, sizeof(Context_Control) ); /* sizeof(jmp_buf)); */ 387 383 388 384 addr = (unsigned32 *)_the_context; … … 471 467 ) 472 468 { 469 int status; 470 473 471 /* 474 472 * Switch levels in one operation 475 473 */ 476 474 477 sigprocmask( SIG_SETMASK, &next->isr_level, ¤t->isr_level ); 475 status = sigprocmask( SIG_SETMASK, &next->isr_level, ¤t->isr_level ); 476 if ( status ) 477 _Internal_error_Occurred( 478 INTERNAL_ERROR_CORE, 479 TRUE, 480 status 481 ); 478 482 479 483 if (setjmp(current->regs) == 0) { /* Save the current context */ 480 484 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 482 493 } 483 494 … … 511 522 unsigned32 _CPU_ISR_Disable_support(void) 512 523 { 524 int status; 513 525 sigset_t old_mask; 514 526 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))) 518 536 return 1; 519 537 … … 530 548 ) 531 549 { 550 int status; 551 532 552 if (level == 0) 533 s igprocmask(SIG_UNBLOCK, &_CPU_Signal_mask, 0);553 status = sigprocmask(SIG_UNBLOCK, &_CPU_Signal_mask, 0); 534 554 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 ); 536 563 } 537 564 -
c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c
rb3ac6a8d r3652ad35 30 30 #include <bsp.h> 31 31 #include <rtems/libio.h> 32 #include <rtems/core/intthrd.h> 32 33 33 34 #include <libcsupport.h> … … 86 87 */ 87 88 88 if (heir_task ->name == rtems_build_name('I', 'D', 'L', 'E'))89 if (heir_task == _Internal_threads_Idle_thread) 89 90 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) 91 92 CPU_HPPA_CLICKS_PER_TICK = normal_clock; 92 93 } … … 212 213 memset(&fast_idle_extension, 0, sizeof(fast_idle_extension)); 213 214 214 fast_idle_extension.t ask_switch = fast_idle_switch_hook;215 fast_idle_extension.thread_switch = fast_idle_switch_hook; 215 216 216 217 rc = rtems_extension_create(rtems_build_name('F', 'D', 'L', 'E'), -
c/src/lib/libbsp/i386/force386/console/console.c
rb3ac6a8d r3652ad35 267 267 outbyte( buffer[ count ] ); 268 268 } 269 return maximum; 269 270 rw_args->bytes_moved = maximum; 271 return 0; 270 272 } 271 273 -
c/src/lib/libbsp/i386/force386/startup/bspstart.c
rb3ac6a8d r3652ad35 75 75 else 76 76 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 93 void 94 bsp_pretasking_hook(void) 95 { 96 bsp_libc_init(); 97 98 #ifdef STACK_CHECKER_ON 78 99 /* 79 100 * Initialize the stack bounds checker 101 * We can either turn it on here or from the app. 80 102 */ 81 82 #ifdef STACK_CHECKER_ON 103 83 104 Stack_check_Initialize(); 84 105 #endif 85 86 } 106 107 #ifdef RTEMS_DEBUG 108 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 109 #endif 110 } 111 87 112 88 113 /* … … 136 161 */ 137 162 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; 141 166 142 167 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libbsp/i386/go32/console/console.c
rb3ac6a8d r3652ad35 238 238 outbyte( buffer[ count ] ); 239 239 } 240 return maximum; 240 241 rw_args->bytes_moved = maximum; 242 return 0; 241 243 } 242 244 -
c/src/lib/libbsp/i386/go32/startup/bspstart.c
rb3ac6a8d r3652ad35 82 82 else 83 83 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 100 void 101 bsp_pretasking_hook(void) 102 { 103 bsp_libc_init(); 104 105 #ifdef STACK_CHECKER_ON 85 106 /* 86 107 * Initialize the stack bounds checker 108 * We can either turn it on here or from the app. 87 109 */ 88 89 #ifdef STACK_CHECKER_ON 110 90 111 Stack_check_Initialize(); 91 112 #endif 92 93 } 94 113 114 #ifdef RTEMS_DEBUG 115 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 116 #endif 117 } 118 119 95 120 /* 96 121 * After drivers are setup, register some "filenames" … … 139 164 rtems_progname = "RTEMS"; 140 165 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; 143 168 Cpu_table.postdriver_hook = bsp_postdriver_hook; 144 169 Cpu_table.idle_task = NULL; /* do not override system IDLE task */ -
c/src/lib/libbsp/i960/cvme961/console/console.c
rb3ac6a8d r3652ad35 193 193 outbyte( buffer[ count ] ); 194 194 } 195 return maximum; 195 196 rw_args->bytes_moved = maximum; 197 return 0; 196 198 } 197 199 -
c/src/lib/libbsp/i960/cvme961/startup/bspstart.c
rb3ac6a8d r3652ad35 77 77 else 78 78 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 95 void 96 bsp_pretasking_hook(void) 97 { 98 bsp_libc_init(); 99 100 #ifdef STACK_CHECKER_ON 79 101 /* 80 102 * Initialize the stack bounds checker 103 * We can either turn it on here or from the app. 81 104 */ 82 83 #ifdef STACK_CHECKER_ON 105 84 106 Stack_check_Initialize(); 85 107 #endif 86 } 108 109 #ifdef RTEMS_DEBUG 110 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 111 #endif 112 } 113 87 114 88 115 /* … … 153 180 */ 154 181 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; 158 185 159 186 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libbsp/m68k/dmv152/console/console.c
rb3ac6a8d r3652ad35 231 231 outbyte( buffer[ count ] ); 232 232 } 233 return maximum; 233 234 rw_args->bytes_moved = maximum; 235 return 0; 234 236 } 235 237 -
c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c
rb3ac6a8d r3652ad35 76 76 else 77 77 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 94 void 95 bsp_pretasking_hook(void) 96 { 97 bsp_libc_init(); 98 99 #ifdef STACK_CHECKER_ON 79 100 /* 80 101 * Initialize the stack bounds checker 102 * We can either turn it on here or from the app. 81 103 */ 82 83 #ifdef STACK_CHECKER_ON 104 84 105 Stack_check_Initialize(); 85 106 #endif 86 } 107 108 #ifdef RTEMS_DEBUG 109 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 110 #endif 111 } 112 87 113 88 114 /* … … 159 185 */ 160 186 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; 164 190 165 191 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libbsp/m68k/gen68302/console/console.c
rb3ac6a8d r3652ad35 286 286 outbyte( buffer[ count ] ); 287 287 } 288 return maximum; 288 289 rw_args->bytes_moved = maximum; 290 return 0; 289 291 } 290 292 -
c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c
rb3ac6a8d r3652ad35 83 83 else 84 84 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 101 void 102 bsp_pretasking_hook(void) 103 { 104 bsp_libc_init(); 105 106 #ifdef STACK_CHECKER_ON 86 107 /* 87 108 * 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 91 112 Stack_check_Initialize(); 92 113 #endif 93 } 114 115 #ifdef RTEMS_DEBUG 116 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 117 #endif 118 } 119 94 120 95 121 /* … … 193 219 */ 194 220 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; 198 224 199 225 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libbsp/m68k/idp/console/console.c
rb3ac6a8d r3652ad35 266 266 outbyte( buffer[ count ], minor ); 267 267 } 268 return maximum; 268 269 rw_args->bytes_moved = maximum; 270 return 0; 269 271 } 270 272 -
c/src/lib/libbsp/m68k/idp/startup/bspstart.c
rb3ac6a8d r3652ad35 84 84 else 85 85 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 102 void 103 bsp_pretasking_hook(void) 104 { 105 bsp_libc_init(); 106 107 #ifdef STACK_CHECKER_ON 87 108 /* 88 109 * Initialize the stack bounds checker 110 * We can either turn it on here or from the app. 89 111 */ 90 112 91 #ifdef STACK_CHECKER_ON92 113 Stack_check_Initialize(); 114 #endif 115 116 #ifdef RTEMS_DEBUG 117 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 93 118 #endif 94 119 } … … 167 192 */ 168 193 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 173 198 Cpu_table.postdriver_hook = bsp_postdriver_hook; 174 199 175 200 Cpu_table.idle_task = NULL; /* do not override system IDLE task */ 176 201 -
c/src/lib/libbsp/m68k/mvme136/console/console.c
rb3ac6a8d r3652ad35 206 206 outbyte( buffer[ count ] ); 207 207 } 208 return maximum; 208 209 rw_args->bytes_moved = maximum; 210 return 0; 209 211 } 210 212 -
c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c
rb3ac6a8d r3652ad35 54 54 extern int end; 55 55 rtems_unsigned32 heap_start; 56 57 #ifdef RTEMS_DEBUG58 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );59 #endif60 56 61 57 heap_start = (rtems_unsigned32) &end; … … 81 77 else 82 78 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 95 void 96 bsp_pretasking_hook(void) 97 { 98 bsp_libc_init(); 99 100 #ifdef STACK_CHECKER_ON 84 101 /* 85 102 * Initialize the stack bounds checker 103 * We can either turn it on here or from the app. 86 104 */ 87 88 #ifdef STACK_CHECKER_ON 105 89 106 Stack_check_Initialize(); 90 107 #endif 91 } 108 109 #ifdef RTEMS_DEBUG 110 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 111 #endif 112 } 113 92 114 93 115 /* … … 153 175 */ 154 176 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; 158 180 159 181 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libbsp/m68k/mvme162/console/console.c
rb3ac6a8d r3652ad35 238 238 outbyte( buffer[ count ], minor ); 239 239 } 240 return maximum; 240 241 rw_args->bytes_moved = maximum; 242 return 0; 241 243 } 242 244 -
c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c
rb3ac6a8d r3652ad35 83 83 else 84 84 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 101 void 102 bsp_pretasking_hook(void) 103 { 104 bsp_libc_init(); 105 106 #ifdef STACK_CHECKER_ON 86 107 /* 87 108 * Initialize the stack bounds checker 109 * We can either turn it on here or from the app. 88 110 */ 89 90 #ifdef STACK_CHECKER_ON 111 91 112 Stack_check_Initialize(); 92 113 #endif 93 } 114 115 #ifdef RTEMS_DEBUG 116 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 117 #endif 118 } 119 94 120 95 121 /* … … 166 192 */ 167 193 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; 171 197 172 198 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libbsp/no_cpu/no_bsp/console/console.c
rb3ac6a8d r3652ad35 205 205 outbyte( buffer[ count ] ); 206 206 } 207 return maximum; 207 208 rw_args->bytes_moved = maximum; 209 return 0; 208 210 } 209 211 -
c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c
rb3ac6a8d r3652ad35 84 84 else 85 85 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 102 void 103 bsp_pretasking_hook(void) 104 { 105 bsp_libc_init(); 106 107 #ifdef STACK_CHECKER_ON 87 108 /* 88 109 * 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 92 113 Stack_check_Initialize(); 93 114 #endif 94 } 115 116 #ifdef RTEMS_DEBUG 117 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 118 #endif 119 } 120 95 121 96 122 /* … … 120 146 } 121 147 122 int main(148 int bsp_start( 123 149 int argc, 124 150 char **argv, … … 197 223 */ 198 224 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; 202 228 203 229 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libbsp/no_cpu/no_bsp/startup/main.c
rb3ac6a8d r3652ad35 20 20 int main( 21 21 int argc, 22 char **argv 22 char **argv, 23 char **environp 23 24 ) 24 25 { 25 bsp_start( );26 bsp_start( argc, argv, environp ); 26 27 27 28 /* -
c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c
rb3ac6a8d r3652ad35 102 102 libc_init(0); /* non-reentrant */ 103 103 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 120 void 121 bsp_pretasking_hook(void) 122 { 123 bsp_libc_init(); 124 125 #ifdef STACK_CHECKER_ON 104 126 /* 105 127 * 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 109 131 Stack_check_Initialize(); 110 132 #endif 111 } 133 134 #ifdef RTEMS_DEBUG 135 rtems_debug_enable( RTEMS_DEBUG_ALL_MASK ); 136 #endif 137 } 138 112 139 113 140 /* … … 205 232 */ 206 233 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; 214 237 215 238 Cpu_table.postdriver_hook = bsp_postdriver_hook; -
c/src/lib/libmisc/monitor/mon-object.c
rb3ac6a8d r3652ad35 131 131 #warning "TONY... FIX ME!!!!!" 132 132 #if defined(hppa1_1) 133 # error"TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>"133 #warning "TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>" 134 134 #endif 135 135 id = _Objects_Build_id(0, default_node, rtems_get_index(id)); -
c/src/lib/libmisc/monitor/mon-queue.c
rb3ac6a8d r3652ad35 19 19 20 20 canonical_queue->attributes = rtems_queue->attribute_set; 21 canonical_queue->maximum_message_size = rtems_queue->m aximum_message_size;22 canonical_queue->maximum_pending_messages = rtems_queue->m aximum_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; 24 24 } 25 25 -
c/src/libmisc/monitor/mon-object.c
rb3ac6a8d r3652ad35 131 131 #warning "TONY... FIX ME!!!!!" 132 132 #if defined(hppa1_1) 133 # error"TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>"133 #warning "TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>" 134 134 #endif 135 135 id = _Objects_Build_id(0, default_node, rtems_get_index(id)); -
c/src/libmisc/monitor/mon-queue.c
rb3ac6a8d r3652ad35 19 19 20 20 canonical_queue->attributes = rtems_queue->attribute_set; 21 canonical_queue->maximum_message_size = rtems_queue->m aximum_message_size;22 canonical_queue->maximum_pending_messages = rtems_queue->m aximum_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; 24 24 } 25 25 -
c/src/tests/mptests/mp01/init.c
rb3ac6a8d r3652ad35 54 54 Task_name[ 1 ], 55 55 1, 56 2048,56 RTEMS_MINIMUM_STACK_SIZE, 57 57 RTEMS_DEFAULT_MODES, 58 58 RTEMS_GLOBAL, … … 65 65 Task_name[ 2 ], 66 66 1, 67 2048,67 RTEMS_MINIMUM_STACK_SIZE, 68 68 RTEMS_TIMESLICE, 69 69 RTEMS_GLOBAL, … … 76 76 Task_name[ 3 ], 77 77 1, 78 2048,78 RTEMS_MINIMUM_STACK_SIZE, 79 79 RTEMS_DEFAULT_MODES, 80 80 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/mptests/mp02/init.c
rb3ac6a8d r3652ad35 44 44 Task_name[Multiprocessing_configuration.node], 45 45 1, 46 2048,46 RTEMS_MINIMUM_STACK_SIZE, 47 47 RTEMS_NO_PREEMPT, 48 48 RTEMS_GLOBAL, -
c/src/tests/mptests/mp03/init.c
rb3ac6a8d r3652ad35 44 44 Task_name[ Multiprocessing_configuration.node ], 45 45 1, 46 2048,46 RTEMS_MINIMUM_STACK_SIZE, 47 47 RTEMS_NO_PREEMPT, 48 48 RTEMS_GLOBAL, -
c/src/tests/mptests/mp04/init.c
rb3ac6a8d r3652ad35 44 44 Task_name[ Multiprocessing_configuration.node ], 45 45 Multiprocessing_configuration.node, 46 2048,46 RTEMS_MINIMUM_STACK_SIZE, 47 47 RTEMS_DEFAULT_MODES, 48 48 RTEMS_GLOBAL, -
c/src/tests/mptests/mp05/init.c
rb3ac6a8d r3652ad35 44 44 Task_name[Multiprocessing_configuration.node], 45 45 1, 46 1024,46 RTEMS_MINIMUM_STACK_SIZE, 47 47 RTEMS_TIMESLICE, 48 48 RTEMS_GLOBAL, -
c/src/tests/mptests/mp06/init.c
rb3ac6a8d r3652ad35 44 44 Task_name[Multiprocessing_configuration.node], 45 45 1, 46 1024,46 RTEMS_MINIMUM_STACK_SIZE, 47 47 RTEMS_DEFAULT_MODES, 48 48 RTEMS_GLOBAL, -
c/src/tests/mptests/mp07/init.c
rb3ac6a8d r3652ad35 44 44 Task_name[Multiprocessing_configuration.node], 45 45 1, 46 2048,46 RTEMS_MINIMUM_STACK_SIZE, 47 47 RTEMS_TIMESLICE, 48 48 RTEMS_GLOBAL, -
c/src/tests/mptests/mp08/init.c
rb3ac6a8d r3652ad35 58 58 Task_name[ Multiprocessing_configuration.node ], 59 59 1, 60 2048,60 RTEMS_MINIMUM_STACK_SIZE, 61 61 RTEMS_TIMESLICE, 62 62 RTEMS_GLOBAL, -
c/src/tests/mptests/mp09/init.c
rb3ac6a8d r3652ad35 58 58 Task_name[Multiprocessing_configuration.node], 59 59 1, 60 1024,60 RTEMS_MINIMUM_STACK_SIZE, 61 61 RTEMS_TIMESLICE, 62 62 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/mptests/mp10/init.c
rb3ac6a8d r3652ad35 81 81 Task_name[ 1 ], 82 82 1, 83 1024,83 RTEMS_MINIMUM_STACK_SIZE, 84 84 RTEMS_TIMESLICE, 85 85 RTEMS_DEFAULT_ATTRIBUTES, … … 96 96 Task_name[ 2 ], 97 97 1, 98 1024,98 RTEMS_MINIMUM_STACK_SIZE, 99 99 RTEMS_TIMESLICE, 100 100 RTEMS_DEFAULT_ATTRIBUTES, … … 111 111 Task_name[ 3 ], 112 112 1, 113 1024,113 RTEMS_MINIMUM_STACK_SIZE, 114 114 RTEMS_TIMESLICE, 115 115 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/mptests/mp11/init.c
rb3ac6a8d r3652ad35 55 55 Task_name[ 1 ], 56 56 1, 57 1024,57 RTEMS_MINIMUM_STACK_SIZE, 58 58 RTEMS_DEFAULT_MODES, 59 59 RTEMS_GLOBAL, -
c/src/tests/mptests/mp13/init.c
rb3ac6a8d r3652ad35 77 77 Task_name[ 1 ], 78 78 1, 79 1024,79 RTEMS_MINIMUM_STACK_SIZE, 80 80 RTEMS_TIMESLICE, 81 81 RTEMS_DEFAULT_ATTRIBUTES, … … 92 92 Task_name[ 2 ], 93 93 1, 94 1024,94 RTEMS_MINIMUM_STACK_SIZE, 95 95 RTEMS_TIMESLICE, 96 96 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/mptests/mp14/init.c
rb3ac6a8d r3652ad35 121 121 Task_name[ Multiprocessing_configuration.node ], 122 122 2, 123 2048,123 RTEMS_MINIMUM_STACK_SIZE, 124 124 RTEMS_TIMESLICE, 125 125 RTEMS_GLOBAL, … … 136 136 Semaphore_task_name[ Multiprocessing_configuration.node ], 137 137 2, 138 2048,138 RTEMS_MINIMUM_STACK_SIZE, 139 139 RTEMS_TIMESLICE, 140 140 RTEMS_GLOBAL, … … 151 151 Queue_task_name[ Multiprocessing_configuration.node ], 152 152 2, 153 2048,153 RTEMS_MINIMUM_STACK_SIZE, 154 154 RTEMS_TIMESLICE, 155 155 RTEMS_GLOBAL, … … 167 167 Partition_task_name[ Multiprocessing_configuration.node ], 168 168 2, 169 2048,169 RTEMS_MINIMUM_STACK_SIZE, 170 170 RTEMS_TIMESLICE, 171 171 RTEMS_GLOBAL, -
c/src/tests/samples/base_mp/init.c
rb3ac6a8d r3652ad35 36 36 printf( "Creating and starting an application task\n" ); 37 37 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, 39 39 RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid ); 40 40 status = rtems_task_start( -
c/src/tests/samples/base_sp/init.c
rb3ac6a8d r3652ad35 40 40 task_name = rtems_build_name( 'T', 'A', '1', ' ' ); 41 41 42 status = rtems_task_create( task_name, 1, 1024,42 status = rtems_task_create( task_name, 1, RTEMS_MINIMUM_STACK_SIZE, 43 43 RTEMS_INTERRUPT_LEVEL(0), RTEMS_DEFAULT_ATTRIBUTES, &tid ); 44 44 -
c/src/tests/samples/ticker/init.c
rb3ac6a8d r3652ad35 41 41 Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' ); 42 42 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 ); 49 55 50 56 status = rtems_task_start( Task_id[ 1 ], Test_task, 1 ); -
c/src/tests/sptests/sp01/init.c
rb3ac6a8d r3652ad35 46 46 Task_name[ 1 ], 47 47 1, 48 2 * 1024,48 RTEMS_MINIMUM_STACK_SIZE, 49 49 RTEMS_INTERRUPT_LEVEL(31), 50 50 RTEMS_DEFAULT_ATTRIBUTES, … … 56 56 Task_name[ 2 ], 57 57 1, 58 2 * 1024,58 RTEMS_MINIMUM_STACK_SIZE * 2, 59 59 RTEMS_DEFAULT_MODES, 60 60 RTEMS_DEFAULT_ATTRIBUTES, … … 66 66 Task_name[ 3 ], 67 67 1, 68 2 * 1024,68 RTEMS_MINIMUM_STACK_SIZE * 3, 69 69 RTEMS_DEFAULT_MODES, 70 70 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp02/init.c
rb3ac6a8d r3652ad35 39 39 Preempt_task_name, 40 40 1, 41 2048,41 RTEMS_MINIMUM_STACK_SIZE, 42 42 RTEMS_DEFAULT_MODES, 43 43 RTEMS_DEFAULT_ATTRIBUTES, … … 60 60 Task_name[ 1 ], 61 61 3, 62 2048,62 RTEMS_MINIMUM_STACK_SIZE, 63 63 RTEMS_DEFAULT_MODES, 64 64 RTEMS_DEFAULT_ATTRIBUTES, … … 70 70 Task_name[ 2 ], 71 71 3, 72 2048,72 RTEMS_MINIMUM_STACK_SIZE, 73 73 RTEMS_DEFAULT_MODES, 74 74 RTEMS_DEFAULT_ATTRIBUTES, … … 80 80 Task_name[ 3 ], 81 81 3, 82 2048,82 RTEMS_MINIMUM_STACK_SIZE, 83 83 RTEMS_DEFAULT_MODES, 84 84 RTEMS_DEFAULT_ATTRIBUTES, … … 112 112 Task_name[ 1 ], 113 113 1, 114 2048,114 RTEMS_MINIMUM_STACK_SIZE, 115 115 RTEMS_DEFAULT_MODES, 116 116 RTEMS_DEFAULT_ATTRIBUTES, … … 122 122 Task_name[ 2 ], 123 123 3, 124 2048,124 RTEMS_MINIMUM_STACK_SIZE, 125 125 RTEMS_DEFAULT_MODES, 126 126 RTEMS_DEFAULT_ATTRIBUTES, … … 132 132 Task_name[ 3 ], 133 133 3, 134 2048,134 RTEMS_MINIMUM_STACK_SIZE, 135 135 RTEMS_DEFAULT_MODES, 136 136 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp03/init.c
rb3ac6a8d r3652ad35 40 40 Task_name[ 1 ], 41 41 1, 42 2048,42 RTEMS_MINIMUM_STACK_SIZE, 43 43 RTEMS_DEFAULT_MODES, 44 44 RTEMS_DEFAULT_ATTRIBUTES, … … 50 50 Task_name[ 2 ], 51 51 1, 52 2048,52 RTEMS_MINIMUM_STACK_SIZE, 53 53 RTEMS_DEFAULT_MODES, 54 54 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp04/init.c
rb3ac6a8d r3652ad35 71 71 Task_name[ 1 ], 72 72 1, 73 2048,73 RTEMS_MINIMUM_STACK_SIZE * 2, 74 74 RTEMS_TIMESLICE, 75 75 RTEMS_DEFAULT_ATTRIBUTES, … … 81 81 Task_name[ 2 ], 82 82 1, 83 2048,83 RTEMS_MINIMUM_STACK_SIZE * 2, 84 84 RTEMS_TIMESLICE, 85 85 RTEMS_DEFAULT_ATTRIBUTES, … … 91 91 Task_name[ 3 ], 92 92 1, 93 2048,93 RTEMS_MINIMUM_STACK_SIZE * 2, 94 94 RTEMS_TIMESLICE, 95 95 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp05/init.c
rb3ac6a8d r3652ad35 41 41 Task_name[ 1 ], 42 42 1, 43 2048,43 RTEMS_MINIMUM_STACK_SIZE, 44 44 RTEMS_DEFAULT_MODES, 45 45 RTEMS_DEFAULT_ATTRIBUTES, … … 51 51 Task_name[ 2 ], 52 52 1, 53 2048,53 RTEMS_MINIMUM_STACK_SIZE, 54 54 RTEMS_DEFAULT_MODES, 55 55 RTEMS_DEFAULT_ATTRIBUTES, … … 61 61 Task_name[ 3 ], 62 62 1, 63 2048,63 RTEMS_MINIMUM_STACK_SIZE, 64 64 RTEMS_DEFAULT_MODES, 65 65 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp06/init.c
rb3ac6a8d r3652ad35 45 45 Task_name[ 1 ], 46 46 1, 47 2048,47 RTEMS_MINIMUM_STACK_SIZE, 48 48 RTEMS_DEFAULT_MODES, 49 49 RTEMS_DEFAULT_ATTRIBUTES, … … 55 55 Task_name[ 2 ], 56 56 1, 57 2048,57 RTEMS_MINIMUM_STACK_SIZE, 58 58 RTEMS_DEFAULT_MODES, 59 59 RTEMS_DEFAULT_ATTRIBUTES, … … 65 65 Task_name[ 3 ], 66 66 10, 67 2048,67 RTEMS_MINIMUM_STACK_SIZE, 68 68 RTEMS_DEFAULT_MODES, 69 69 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp07/init.c
rb3ac6a8d r3652ad35 63 63 Task_name[ 1 ], 64 64 4, 65 2048,65 RTEMS_MINIMUM_STACK_SIZE, 66 66 RTEMS_DEFAULT_MODES, 67 67 RTEMS_DEFAULT_ATTRIBUTES, … … 73 73 Task_name[ 2 ], 74 74 4, 75 2048,75 RTEMS_MINIMUM_STACK_SIZE, 76 76 RTEMS_DEFAULT_MODES, 77 77 RTEMS_DEFAULT_ATTRIBUTES, … … 83 83 Task_name[ 3 ], 84 84 250, 85 2048,85 RTEMS_MINIMUM_STACK_SIZE, 86 86 RTEMS_DEFAULT_MODES, 87 87 RTEMS_DEFAULT_ATTRIBUTES, … … 93 93 Task_name[ 4 ], 94 94 254, 95 2048,95 RTEMS_MINIMUM_STACK_SIZE, 96 96 RTEMS_DEFAULT_MODES, 97 97 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp08/init.c
rb3ac6a8d r3652ad35 39 39 Task_name[ 1 ], 40 40 1, 41 2048,41 RTEMS_MINIMUM_STACK_SIZE, 42 42 RTEMS_DEFAULT_MODES, 43 43 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp09/init.c
rb3ac6a8d r3652ad35 83 83 Task_name[1], 84 84 0, 85 2048,85 RTEMS_MINIMUM_STACK_SIZE, 86 86 RTEMS_DEFAULT_MODES, 87 87 RTEMS_DEFAULT_ATTRIBUTES, … … 98 98 Task_name[ 1 ], 99 99 4, 100 2048,100 RTEMS_MINIMUM_STACK_SIZE * 3, 101 101 RTEMS_DEFAULT_MODES, 102 102 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp09/screen03.c
rb3ac6a8d r3652ad35 31 31 0, 32 32 1, 33 2048,33 RTEMS_MINIMUM_STACK_SIZE, 34 34 RTEMS_DEFAULT_MODES, 35 35 RTEMS_DEFAULT_ATTRIBUTES, … … 61 61 Task_name[ 2 ], 62 62 4, 63 2048,63 RTEMS_MINIMUM_STACK_SIZE, 64 64 RTEMS_DEFAULT_MODES, 65 65 RTEMS_DEFAULT_ATTRIBUTES, … … 88 88 Task_name[ 3 ], 89 89 4, 90 2048,90 RTEMS_MINIMUM_STACK_SIZE, 91 91 RTEMS_DEFAULT_MODES, 92 92 RTEMS_DEFAULT_ATTRIBUTES, … … 99 99 Task_name[ 4 ], 100 100 4, 101 2048,101 RTEMS_MINIMUM_STACK_SIZE, 102 102 RTEMS_DEFAULT_MODES, 103 103 RTEMS_DEFAULT_ATTRIBUTES, … … 110 110 Task_name[ 5 ], 111 111 4, 112 2048,112 RTEMS_MINIMUM_STACK_SIZE, 113 113 RTEMS_DEFAULT_MODES, 114 114 RTEMS_DEFAULT_ATTRIBUTES, … … 121 121 Task_name[ 6 ], 122 122 4, 123 2048,123 RTEMS_MINIMUM_STACK_SIZE, 124 124 RTEMS_DEFAULT_MODES, 125 125 RTEMS_DEFAULT_ATTRIBUTES, … … 132 132 Task_name[ 7 ], 133 133 4, 134 2048,134 RTEMS_MINIMUM_STACK_SIZE, 135 135 RTEMS_DEFAULT_MODES, 136 136 RTEMS_DEFAULT_ATTRIBUTES, … … 143 143 Task_name[ 8 ], 144 144 4, 145 2048,145 RTEMS_MINIMUM_STACK_SIZE, 146 146 RTEMS_DEFAULT_MODES, 147 147 RTEMS_DEFAULT_ATTRIBUTES, … … 154 154 Task_name[ 9 ], 155 155 4, 156 2048,156 RTEMS_MINIMUM_STACK_SIZE, 157 157 RTEMS_DEFAULT_MODES, 158 158 RTEMS_DEFAULT_ATTRIBUTES, … … 165 165 Task_name[ 10 ], 166 166 4, 167 2048,167 RTEMS_MINIMUM_STACK_SIZE, 168 168 RTEMS_DEFAULT_MODES, 169 169 RTEMS_DEFAULT_ATTRIBUTES, … … 176 176 task_name, 177 177 4, 178 2048,178 RTEMS_MINIMUM_STACK_SIZE, 179 179 RTEMS_DEFAULT_MODES, 180 180 RTEMS_DEFAULT_ATTRIBUTES, … … 191 191 task_name, 192 192 4, 193 2048,193 RTEMS_MINIMUM_STACK_SIZE, 194 194 RTEMS_DEFAULT_MODES, 195 195 RTEMS_GLOBAL, -
c/src/tests/sptests/sp11/init.c
rb3ac6a8d r3652ad35 40 40 Task_name[ 1 ], 41 41 4, 42 2048,42 RTEMS_MINIMUM_STACK_SIZE * 2, 43 43 RTEMS_DEFAULT_MODES, 44 44 RTEMS_DEFAULT_ATTRIBUTES, … … 50 50 Task_name[ 2 ], 51 51 4, 52 2048,52 RTEMS_MINIMUM_STACK_SIZE, 53 53 RTEMS_DEFAULT_MODES, 54 54 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp12/init.c
rb3ac6a8d r3652ad35 139 139 Task_name[ 1 ], 140 140 4, 141 2048,141 RTEMS_MINIMUM_STACK_SIZE, 142 142 RTEMS_DEFAULT_MODES, 143 143 RTEMS_DEFAULT_ATTRIBUTES, … … 149 149 Task_name[ 2 ], 150 150 4, 151 2048,151 RTEMS_MINIMUM_STACK_SIZE, 152 152 RTEMS_DEFAULT_MODES, 153 153 RTEMS_DEFAULT_ATTRIBUTES, … … 159 159 Task_name[ 3 ], 160 160 4, 161 2048,161 RTEMS_MINIMUM_STACK_SIZE, 162 162 RTEMS_DEFAULT_MODES, 163 163 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp12/pridrv.c
rb3ac6a8d r3652ad35 48 48 Priority_task_name[ index ], 49 49 Task_priority[ index ], 50 2048,50 RTEMS_MINIMUM_STACK_SIZE, 51 51 RTEMS_DEFAULT_MODES, 52 52 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp12/task1.c
rb3ac6a8d r3652ad35 101 101 Task_name[ 4 ], 102 102 4, 103 2048,103 RTEMS_MINIMUM_STACK_SIZE, 104 104 RTEMS_DEFAULT_MODES, 105 105 RTEMS_DEFAULT_ATTRIBUTES, … … 111 111 Task_name[ 5 ], 112 112 4, 113 2048,113 RTEMS_MINIMUM_STACK_SIZE, 114 114 RTEMS_DEFAULT_MODES, 115 115 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp13/init.c
rb3ac6a8d r3652ad35 41 41 Task_name[ 1 ], 42 42 4, 43 2048,43 RTEMS_MINIMUM_STACK_SIZE * 2, 44 44 RTEMS_DEFAULT_MODES, 45 45 RTEMS_DEFAULT_ATTRIBUTES, … … 51 51 Task_name[ 2 ], 52 52 4, 53 2048,53 RTEMS_MINIMUM_STACK_SIZE, 54 54 RTEMS_DEFAULT_MODES, 55 55 RTEMS_DEFAULT_ATTRIBUTES, … … 61 61 Task_name[ 3 ], 62 62 4, 63 2048,63 RTEMS_MINIMUM_STACK_SIZE, 64 64 RTEMS_DEFAULT_MODES, 65 65 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp14/init.c
rb3ac6a8d r3652ad35 40 40 Task_name[ 1 ], 41 41 4, 42 2048,42 RTEMS_MINIMUM_STACK_SIZE, 43 43 RTEMS_DEFAULT_MODES, 44 44 RTEMS_DEFAULT_ATTRIBUTES, … … 50 50 Task_name[ 2 ], 51 51 4, 52 2048,52 RTEMS_MINIMUM_STACK_SIZE, 53 53 RTEMS_DEFAULT_MODES, 54 54 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp15/init.c
rb3ac6a8d r3652ad35 42 42 Task_name[ 1 ], 43 43 4, 44 2048,44 RTEMS_MINIMUM_STACK_SIZE, 45 45 RTEMS_DEFAULT_MODES, 46 46 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp16/init.c
rb3ac6a8d r3652ad35 43 43 Task_name[ 1 ], 44 44 BASE_PRIORITY, 45 2048,45 RTEMS_MINIMUM_STACK_SIZE, 46 46 RTEMS_DEFAULT_MODES, 47 47 RTEMS_DEFAULT_ATTRIBUTES, … … 53 53 Task_name[ 2 ], 54 54 BASE_PRIORITY, 55 2048,55 RTEMS_MINIMUM_STACK_SIZE, 56 56 RTEMS_DEFAULT_MODES, 57 57 RTEMS_DEFAULT_ATTRIBUTES, … … 63 63 Task_name[ 3 ], 64 64 BASE_PRIORITY, 65 2048,65 RTEMS_MINIMUM_STACK_SIZE, 66 66 RTEMS_DEFAULT_MODES, 67 67 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp16/task1.c
rb3ac6a8d r3652ad35 129 129 Task_name[ 4 ], 130 130 BASE_PRIORITY, 131 2048,131 RTEMS_MINIMUM_STACK_SIZE, 132 132 RTEMS_DEFAULT_MODES, 133 133 RTEMS_DEFAULT_ATTRIBUTES, … … 139 139 Task_name[ 5 ], 140 140 BASE_PRIORITY, 141 2048,141 RTEMS_MINIMUM_STACK_SIZE, 142 142 RTEMS_DEFAULT_MODES, 143 143 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp17/init.c
rb3ac6a8d r3652ad35 42 42 Task_name[ 1 ], 43 43 2, 44 2048,44 RTEMS_MINIMUM_STACK_SIZE, 45 45 RTEMS_DEFAULT_MODES, 46 46 RTEMS_DEFAULT_ATTRIBUTES, … … 55 55 Task_name[ 2 ], 56 56 1, 57 2048,57 RTEMS_MINIMUM_STACK_SIZE, 58 58 RTEMS_DEFAULT_MODES, 59 59 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp19/init.c
rb3ac6a8d r3652ad35 44 44 Task_name[ 1 ], 45 45 2, 46 8192,46 RTEMS_MINIMUM_STACK_SIZE * 4, 47 47 RTEMS_DEFAULT_MODES, 48 48 RTEMS_FLOATING_POINT, … … 54 54 Task_name[ 2 ], 55 55 2, 56 8192,56 RTEMS_MINIMUM_STACK_SIZE * 4, 57 57 RTEMS_DEFAULT_MODES, 58 58 RTEMS_DEFAULT_ATTRIBUTES, … … 64 64 Task_name[ 3 ], 65 65 2, 66 8192,66 RTEMS_MINIMUM_STACK_SIZE * 4, 67 67 RTEMS_DEFAULT_MODES, 68 68 RTEMS_DEFAULT_ATTRIBUTES, … … 74 74 Task_name[ 4 ], 75 75 2, 76 8192,76 RTEMS_MINIMUM_STACK_SIZE * 4, 77 77 RTEMS_DEFAULT_MODES, 78 78 RTEMS_FLOATING_POINT, … … 84 84 Task_name[ 5 ], 85 85 2, 86 8192,86 RTEMS_MINIMUM_STACK_SIZE * 4, 87 87 RTEMS_DEFAULT_MODES, 88 88 RTEMS_FLOATING_POINT, … … 94 94 Task_name[ 6 ], 95 95 1, 96 8192,96 RTEMS_MINIMUM_STACK_SIZE * 4, 97 97 RTEMS_DEFAULT_MODES, 98 98 RTEMS_FLOATING_POINT, -
c/src/tests/sptests/sp20/init.c
rb3ac6a8d r3652ad35 45 45 Task_name[ index ], 46 46 Priorities[ index ], 47 4096,47 RTEMS_MINIMUM_STACK_SIZE, 48 48 RTEMS_DEFAULT_MODES, 49 49 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp21/init.c
rb3ac6a8d r3652ad35 39 39 Task_name[ 1 ], 40 40 1, 41 2048,41 RTEMS_MINIMUM_STACK_SIZE, 42 42 RTEMS_DEFAULT_MODES, 43 43 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp22/init.c
rb3ac6a8d r3652ad35 46 46 Task_name[ 1 ], 47 47 1, 48 2048,48 RTEMS_MINIMUM_STACK_SIZE, 49 49 RTEMS_DEFAULT_MODES, 50 50 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp23/init.c
rb3ac6a8d r3652ad35 39 39 Task_name[ 1 ], 40 40 1, 41 2048,41 RTEMS_MINIMUM_STACK_SIZE, 42 42 RTEMS_DEFAULT_MODES, 43 43 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp24/init.c
rb3ac6a8d r3652ad35 53 53 Task_name[ index ], 54 54 1, 55 2048,55 RTEMS_MINIMUM_STACK_SIZE, 56 56 RTEMS_DEFAULT_MODES, 57 57 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/sp25/init.c
rb3ac6a8d r3652ad35 39 39 Task_name[ 1 ], 40 40 BASE_PRIORITY, 41 2048,41 RTEMS_MINIMUM_STACK_SIZE, 42 42 RTEMS_DEFAULT_MODES, 43 43 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/spfatal/init.c
rb3ac6a8d r3652ad35 37 37 Task_name[ 1 ], 38 38 1, 39 2048,39 RTEMS_MINIMUM_STACK_SIZE, 40 40 RTEMS_DEFAULT_MODES, 41 41 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/sptests/spsize/size.c
rb3ac6a8d r3652ad35 67 67 #define PER_MSGQ \ 68 68 (sizeof (Message_queue_Control) + NAME_PTR_SIZE) 69 #define PER_MSG_OVERHEAD \70 (sizeof (Message_queue_Buffer_control))71 69 #define PER_REGN \ 72 70 (sizeof (Region_Control) + NAME_PTR_SIZE) … … 480 478 total_size += size_msgqs; 481 479 482 printf( "What is maximum_messages? " );480 printf( "What is maximum_messages? XXXX " ); 483 481 maximum_msgs = getint(); 484 size_msgs_overhead = PER_MSG_OVERHEAD * maximum_msgs;482 size_msgs_overhead = 0; 485 483 total_size += size_msgs_overhead; 486 484 … … 571 569 maximum_msgqs, PER_MSGQ, size_msgqs ); 572 570 printf( " 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 ); 574 572 printf( " Regions - %03d * %03d = %d\n", 575 573 maximum_regns, PER_REGN, size_regns); -
c/src/tests/tmtests/tm01/task1.c
rb3ac6a8d r3652ad35 36 36 Task_name[ 1 ], 37 37 128, 38 4096,38 RTEMS_MINIMUM_STACK_SIZE, 39 39 RTEMS_DEFAULT_MODES, 40 40 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm02/task1.c
rb3ac6a8d r3652ad35 61 61 rtems_build_name( 'H', 'I', 'G', 'H' ), 62 62 priority, 63 1024,63 RTEMS_MINIMUM_STACK_SIZE, 64 64 RTEMS_DEFAULT_MODES, 65 65 RTEMS_DEFAULT_ATTRIBUTES, … … 77 77 rtems_build_name( 'M', 'I', 'D', ' ' ), 78 78 priority, 79 1024,79 RTEMS_MINIMUM_STACK_SIZE, 80 80 RTEMS_DEFAULT_MODES, 81 81 RTEMS_DEFAULT_ATTRIBUTES, … … 93 93 rtems_build_name( 'L', 'O', 'W', ' ' ), 94 94 priority, 95 2048,95 RTEMS_MINIMUM_STACK_SIZE, 96 96 RTEMS_DEFAULT_MODES, 97 97 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm03/task1.c
rb3ac6a8d r3652ad35 42 42 rtems_build_name( 'T', 'A', '1', ' ' ), 43 43 252, 44 2048,44 RTEMS_MINIMUM_STACK_SIZE, 45 45 RTEMS_DEFAULT_MODES, 46 46 RTEMS_DEFAULT_ATTRIBUTES, … … 80 80 rtems_build_name( 'M', 'I', 'D', ' ' ), 81 81 priority, 82 1024,82 RTEMS_MINIMUM_STACK_SIZE, 83 83 RTEMS_DEFAULT_MODES, 84 84 RTEMS_DEFAULT_ATTRIBUTES, … … 96 96 rtems_build_name( 'H', 'I', 'G', 'H' ), 97 97 priority, 98 1024,98 RTEMS_MINIMUM_STACK_SIZE, 99 99 RTEMS_DEFAULT_MODES, 100 100 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm04/task1.c
rb3ac6a8d r3652ad35 62 62 rtems_build_name( 'T', 'I', 'M', 'E' ), 63 63 10, 64 1024,64 RTEMS_MINIMUM_STACK_SIZE, 65 65 RTEMS_NO_PREEMPT, 66 66 RTEMS_DEFAULT_ATTRIBUTES, … … 180 180 name, 181 181 10, 182 1024,182 RTEMS_MINIMUM_STACK_SIZE, 183 183 RTEMS_NO_PREEMPT, 184 184 RTEMS_DEFAULT_ATTRIBUTES, … … 218 218 name, 219 219 250, 220 1024,220 RTEMS_MINIMUM_STACK_SIZE, 221 221 RTEMS_NO_PREEMPT, 222 222 RTEMS_DEFAULT_ATTRIBUTES, … … 265 265 name, 266 266 250, 267 1024,267 RTEMS_MINIMUM_STACK_SIZE, 268 268 RTEMS_DEFAULT_MODES, 269 269 RTEMS_DEFAULT_ATTRIBUTES, … … 345 345 rtems_build_name( 'H', 'I', ' ', ' ' ), 346 346 5, 347 2048,347 RTEMS_MINIMUM_STACK_SIZE, 348 348 RTEMS_DEFAULT_MODES, 349 349 RTEMS_DEFAULT_ATTRIBUTES, … … 358 358 rtems_build_name( 'H', 'I', 'G', 'H' ), 359 359 3, 360 2048,360 RTEMS_MINIMUM_STACK_SIZE, 361 361 RTEMS_DEFAULT_MODES, 362 362 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm05/task1.c
rb3ac6a8d r3652ad35 62 62 rtems_build_name( 'T', 'I', 'M', 'E' ), 63 63 priority, 64 1024,64 RTEMS_MINIMUM_STACK_SIZE, 65 65 RTEMS_DEFAULT_MODES, 66 66 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm06/task1.c
rb3ac6a8d r3652ad35 55 55 rtems_build_name( 'T', 'I', 'M', 'E' ), 56 56 128, 57 1024,57 RTEMS_MINIMUM_STACK_SIZE, 58 58 RTEMS_DEFAULT_MODES, 59 59 RTEMS_DEFAULT_ATTRIBUTES, … … 100 100 rtems_build_name( 'T', 'I', 'M', 'E' ), 101 101 254, 102 1024,102 RTEMS_MINIMUM_STACK_SIZE, 103 103 RTEMS_DEFAULT_MODES, 104 104 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm07/task1.c
rb3ac6a8d r3652ad35 60 60 rtems_build_name( 'T', 'I', 'M', 'E' ), 61 61 priority, 62 1024,62 RTEMS_MINIMUM_STACK_SIZE, 63 63 RTEMS_DEFAULT_MODES, 64 64 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm08/task1.c
rb3ac6a8d r3652ad35 48 48 1, 49 49 128, 50 1024,50 RTEMS_MINIMUM_STACK_SIZE, 51 51 RTEMS_DEFAULT_MODES, 52 52 RTEMS_DEFAULT_ATTRIBUTES, … … 61 61 1, 62 62 254, 63 1024,63 RTEMS_MINIMUM_STACK_SIZE, 64 64 RTEMS_DEFAULT_MODES, 65 65 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm09/task1.c
rb3ac6a8d r3652ad35 35 35 1, 36 36 128, 37 4096,37 RTEMS_MINIMUM_STACK_SIZE, 38 38 RTEMS_DEFAULT_MODES, 39 39 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm10/task1.c
rb3ac6a8d r3652ad35 63 63 rtems_build_name( 'T', 'I', 'M', 'E' ), 64 64 priority, 65 1024,65 RTEMS_MINIMUM_STACK_SIZE, 66 66 RTEMS_DEFAULT_MODES, 67 67 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm11/task1.c
rb3ac6a8d r3652ad35 46 46 1, 47 47 251, 48 1024,48 RTEMS_MINIMUM_STACK_SIZE, 49 49 RTEMS_DEFAULT_MODES, 50 50 RTEMS_DEFAULT_ATTRIBUTES, … … 90 90 rtems_build_name( 'T', 'I', 'M', 'E' ), 91 91 priority, 92 1024,92 RTEMS_MINIMUM_STACK_SIZE, 93 93 RTEMS_DEFAULT_MODES, 94 94 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm12/task1.c
rb3ac6a8d r3652ad35 46 46 1, 47 47 251, 48 1024,48 RTEMS_MINIMUM_STACK_SIZE, 49 49 RTEMS_DEFAULT_MODES, 50 50 RTEMS_DEFAULT_ATTRIBUTES, … … 86 86 rtems_build_name( 'T', 'I', 'M', 'E' ), 87 87 priority, 88 1024,88 RTEMS_MINIMUM_STACK_SIZE, 89 89 RTEMS_DEFAULT_MODES, 90 90 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm13/task1.c
rb3ac6a8d r3652ad35 45 45 1, 46 46 251, 47 1024,47 RTEMS_MINIMUM_STACK_SIZE, 48 48 RTEMS_DEFAULT_MODES, 49 49 RTEMS_DEFAULT_ATTRIBUTES, … … 89 89 rtems_build_name( 'T', 'I', 'M', 'E' ), 90 90 priority, 91 1024,91 RTEMS_MINIMUM_STACK_SIZE, 92 92 RTEMS_DEFAULT_MODES, 93 93 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm14/task1.c
rb3ac6a8d r3652ad35 46 46 1, 47 47 251, 48 1024,48 RTEMS_MINIMUM_STACK_SIZE, 49 49 RTEMS_DEFAULT_MODES, 50 50 RTEMS_DEFAULT_ATTRIBUTES, … … 86 86 rtems_build_name( 'T', 'I', 'M', 'E' ), 87 87 priority, 88 1024,88 RTEMS_MINIMUM_STACK_SIZE, 89 89 RTEMS_DEFAULT_MODES, 90 90 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm15/task1.c
rb3ac6a8d r3652ad35 55 55 rtems_build_name( 'L', 'O', 'W', ' ' ), 56 56 10, 57 1024,57 RTEMS_MINIMUM_STACK_SIZE, 58 58 RTEMS_NO_PREEMPT, 59 59 RTEMS_DEFAULT_ATTRIBUTES, … … 69 69 rtems_build_name( 'H', 'I', 'G', 'H' ), 70 70 5, 71 1024,71 RTEMS_MINIMUM_STACK_SIZE, 72 72 RTEMS_DEFAULT_MODES, 73 73 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm16/task1.c
rb3ac6a8d r3652ad35 43 43 rtems_build_name( 'T', 'E', 'S', 'T' ), 44 44 251, 45 2048,45 RTEMS_MINIMUM_STACK_SIZE, 46 46 RTEMS_DEFAULT_MODES, 47 47 RTEMS_DEFAULT_ATTRIBUTES, … … 77 77 rtems_build_name( 'M', 'I', 'D', ' ' ), 78 78 priority, 79 1024,79 RTEMS_MINIMUM_STACK_SIZE, 80 80 RTEMS_DEFAULT_MODES, 81 81 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm17/task1.c
rb3ac6a8d r3652ad35 48 48 rtems_build_name( 'T', 'I', 'M', 'E' ), 49 49 Task_priority, 50 1024,50 RTEMS_MINIMUM_STACK_SIZE, 51 51 RTEMS_DEFAULT_MODES, 52 52 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm18/task1.c
rb3ac6a8d r3652ad35 60 60 rtems_build_name( 'T', 'I', 'M', 'E' ), 61 61 128, 62 1024,62 RTEMS_MINIMUM_STACK_SIZE, 63 63 RTEMS_DEFAULT_MODES, 64 64 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm19/task1.c
rb3ac6a8d r3652ad35 48 48 rtems_build_name( 'T', 'I', 'M', 'E' ), 49 49 128, 50 1024,50 RTEMS_MINIMUM_STACK_SIZE, 51 51 RTEMS_DEFAULT_MODES, 52 52 RTEMS_DEFAULT_ATTRIBUTES, … … 61 61 rtems_build_name( 'T', 'I', 'M', 'E' ), 62 62 127, 63 1024,63 RTEMS_MINIMUM_STACK_SIZE, 64 64 RTEMS_DEFAULT_MODES, 65 65 RTEMS_DEFAULT_ATTRIBUTES, … … 74 74 rtems_build_name( 'T', 'I', 'M', 'E' ), 75 75 126, 76 1024,76 RTEMS_MINIMUM_STACK_SIZE, 77 77 RTEMS_DEFAULT_MODES, 78 78 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm20/task1.c
rb3ac6a8d r3652ad35 55 55 rtems_build_name( 'T', 'I', 'M', '1' ), 56 56 128, 57 2048,57 RTEMS_MINIMUM_STACK_SIZE, 58 58 RTEMS_DEFAULT_MODES, 59 59 RTEMS_DEFAULT_ATTRIBUTES, … … 68 68 rtems_build_name( 'T', 'I', 'M', '2' ), 69 69 129, 70 2048,70 RTEMS_MINIMUM_STACK_SIZE, 71 71 RTEMS_DEFAULT_MODES, 72 72 RTEMS_DEFAULT_ATTRIBUTES, … … 349 349 Timer_initialize(); 350 350 for ( index=1 ; index <= OPERATION_COUNT ; index++ ) 351 (void) rtems_io_initialize( 0, 0, NULL );351 (void) rtems_io_initialize( _STUB_major, 0, NULL ); 352 352 end_time = Read_timer(); 353 353 … … 362 362 Timer_initialize(); 363 363 for ( index=1 ; index <= OPERATION_COUNT ; index++ ) 364 (void) rtems_io_open( 0, 0, NULL );364 (void) rtems_io_open( _STUB_major, 0, NULL ); 365 365 end_time = Read_timer(); 366 366 … … 375 375 Timer_initialize(); 376 376 for ( index=1 ; index <= OPERATION_COUNT ; index++ ) 377 (void) rtems_io_close( 0, 0, NULL );377 (void) rtems_io_close( _STUB_major, 0, NULL ); 378 378 end_time = Read_timer(); 379 379 … … 388 388 Timer_initialize(); 389 389 for ( index=1 ; index <= OPERATION_COUNT ; index++ ) 390 (void) rtems_io_read( 0, 0, NULL );390 (void) rtems_io_read( _STUB_major, 0, NULL ); 391 391 end_time = Read_timer(); 392 392 … … 401 401 Timer_initialize(); 402 402 for ( index=1 ; index <= OPERATION_COUNT ; index++ ) 403 (void) rtems_io_write( 0, 0, NULL );403 (void) rtems_io_write( _STUB_major, 0, NULL ); 404 404 end_time = Read_timer(); 405 405 … … 414 414 Timer_initialize(); 415 415 for ( index=1 ; index <= OPERATION_COUNT ; index++ ) 416 (void) rtems_io_control( 0, 0, NULL );416 (void) rtems_io_control( _STUB_major, 0, NULL ); 417 417 end_time = Read_timer(); 418 418 -
c/src/tests/tmtests/tm21/task1.c
rb3ac6a8d r3652ad35 36 36 rtems_build_name( 'T', 'I', 'M', 'E' ), 37 37 250, 38 1024,38 RTEMS_MINIMUM_STACK_SIZE, 39 39 RTEMS_DEFAULT_MODES, 40 40 RTEMS_DEFAULT_ATTRIBUTES, … … 62 62 index, 63 63 254, 64 1024,64 RTEMS_MINIMUM_STACK_SIZE, 65 65 RTEMS_DEFAULT_MODES, 66 66 RTEMS_DEFAULT_ATTRIBUTES, … … 71 71 status = rtems_message_queue_create( 72 72 index, 73 OPERATION_COUNT,73 1, 74 74 16, 75 75 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm22/task1.c
rb3ac6a8d r3652ad35 54 54 rtems_build_name( 'L', 'O', 'W', ' ' ), 55 55 10, 56 2048,56 RTEMS_MINIMUM_STACK_SIZE, 57 57 RTEMS_NO_PREEMPT, 58 58 RTEMS_DEFAULT_ATTRIBUTES, … … 67 67 1, 68 68 11, 69 1024,69 RTEMS_MINIMUM_STACK_SIZE, 70 70 RTEMS_DEFAULT_MODES, 71 71 RTEMS_DEFAULT_ATTRIBUTES, … … 122 122 rtems_build_name( 'H', 'I', 'G', 'H' ), 123 123 5, 124 2048,124 RTEMS_MINIMUM_STACK_SIZE, 125 125 RTEMS_NO_PREEMPT, 126 126 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm23/task1.c
rb3ac6a8d r3652ad35 63 63 rtems_build_name( 'T', 'I', 'M', 'E' ), 64 64 priority, 65 1024,65 RTEMS_MINIMUM_STACK_SIZE, 66 66 RTEMS_DEFAULT_MODES, 67 67 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm24/task1.c
rb3ac6a8d r3652ad35 40 40 rtems_build_name( 'H', 'I', 'G', 'H' ), 41 41 10, 42 1024,42 RTEMS_MINIMUM_STACK_SIZE, 43 43 RTEMS_DEFAULT_MODES, 44 44 RTEMS_DEFAULT_ATTRIBUTES, … … 54 54 rtems_build_name( 'R', 'E', 'S', 'T' ), 55 55 128, 56 1024,56 RTEMS_MINIMUM_STACK_SIZE, 57 57 RTEMS_DEFAULT_MODES, 58 58 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm25/task1.c
rb3ac6a8d r3652ad35 49 49 rtems_build_name( 'L', 'O', 'W', ' ' ), 50 50 254, 51 1024,51 RTEMS_MINIMUM_STACK_SIZE, 52 52 RTEMS_DEFAULT_MODES, 53 53 RTEMS_DEFAULT_ATTRIBUTES, … … 63 63 rtems_build_name( 'T', 'I', 'M', 'E' ), 64 64 128, 65 1024,65 RTEMS_MINIMUM_STACK_SIZE, 66 66 RTEMS_DEFAULT_MODES, 67 67 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm26/task1.c
rb3ac6a8d r3652ad35 73 73 rtems_build_name( 'F', 'P', '1', ' ' ), 74 74 201, 75 2048,75 RTEMS_MINIMUM_STACK_SIZE, 76 76 RTEMS_DEFAULT_MODES, 77 77 RTEMS_FLOATING_POINT, … … 86 86 rtems_build_name( 'F', 'P', '2', ' ' ), 87 87 202, 88 2048,88 RTEMS_MINIMUM_STACK_SIZE, 89 89 RTEMS_DEFAULT_MODES, 90 90 RTEMS_FLOATING_POINT, … … 99 99 rtems_build_name( 'L', 'O', 'W', ' ' ), 100 100 200, 101 2048,101 RTEMS_MINIMUM_STACK_SIZE, 102 102 RTEMS_DEFAULT_MODES, 103 103 RTEMS_DEFAULT_ATTRIBUTES, … … 112 112 rtems_build_name( 'M', 'I', 'D', ' ' ), 113 113 128, 114 2048,114 RTEMS_MINIMUM_STACK_SIZE, 115 115 RTEMS_DEFAULT_MODES, 116 116 RTEMS_DEFAULT_ATTRIBUTES, … … 125 125 rtems_build_name( 'H', 'I', 'G', 'H' ), 126 126 5, 127 2048,127 RTEMS_MINIMUM_STACK_SIZE, 128 128 RTEMS_DEFAULT_MODES, 129 129 RTEMS_DEFAULT_ATTRIBUTES, … … 148 148 rtems_build_name( 'N', 'U', 'L', 'L' ), 149 149 254, 150 1024,150 RTEMS_MINIMUM_STACK_SIZE, 151 151 RTEMS_DEFAULT_MODES, 152 152 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm27/task1.c
rb3ac6a8d r3652ad35 56 56 rtems_build_name( 'T', 'A', '1', ' ' ), 57 57 254, 58 1024,58 RTEMS_MINIMUM_STACK_SIZE, 59 59 RTEMS_DEFAULT_MODES, 60 60 RTEMS_DEFAULT_ATTRIBUTES, … … 69 69 rtems_build_name( 'T', 'A', '2', ' ' ), 70 70 254, 71 1024,71 RTEMS_MINIMUM_STACK_SIZE, 72 72 RTEMS_DEFAULT_MODES, 73 73 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm28/task1.c
rb3ac6a8d r3652ad35 37 37 rtems_build_name( 'T', 'I', 'M', 'E' ), 38 38 128, 39 4096,39 RTEMS_MINIMUM_STACK_SIZE, 40 40 RTEMS_DEFAULT_MODES, 41 41 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tm29/task1.c
rb3ac6a8d r3652ad35 123 123 rtems_build_name( 'T', 'E', 'S', 'T' ), 124 124 128, 125 1024,125 RTEMS_MINIMUM_STACK_SIZE, 126 126 RTEMS_DEFAULT_MODES, 127 127 RTEMS_DEFAULT_ATTRIBUTES, … … 137 137 rtems_build_name( 'L', 'O', 'W', ' ' ), 138 138 200, 139 2048,139 RTEMS_MINIMUM_STACK_SIZE, 140 140 RTEMS_DEFAULT_MODES, 141 141 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tmck/system.h
rb3ac6a8d r3652ad35 33 33 #define CONFIGURE_TEST_NEEDS_TIMER_DRIVER 34 34 35 #define CONFIGURE_MAXIMUM_TASKS 2 11135 #define CONFIGURE_MAXIMUM_TASKS 2 36 36 #define CONFIGURE_TICKS_PER_TIMESLICE 0 37 37 -
c/src/tests/tmtests/tmck/task1.c
rb3ac6a8d r3652ad35 51 51 1, 52 52 5, 53 1024,53 RTEMS_MINIMUM_STACK_SIZE, 54 54 RTEMS_DEFAULT_MODES, 55 55 RTEMS_DEFAULT_ATTRIBUTES, -
c/src/tests/tmtests/tmoverhd/testtask.c
rb3ac6a8d r3652ad35 38 38 rtems_build_name( 'T', 'A', '1', ' ' ), 39 39 254, 40 2048,40 RTEMS_MINIMUM_STACK_SIZE, 41 41 RTEMS_DEFAULT_MODES, 42 42 RTEMS_DEFAULT_ATTRIBUTES, … … 130 130 name, 131 131 in_priority, 132 2048,132 RTEMS_MINIMUM_STACK_SIZE, 133 133 RTEMS_DEFAULT_MODES, 134 134 RTEMS_DEFAULT_ATTRIBUTES, -
cpukit/libmisc/monitor/mon-object.c
rb3ac6a8d r3652ad35 131 131 #warning "TONY... FIX ME!!!!!" 132 132 #if defined(hppa1_1) 133 # error"TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>"133 #warning "TONY... I SAID TO FIX ME!!!!! <HAHAHAHAHA>" 134 134 #endif 135 135 id = _Objects_Build_id(0, default_node, rtems_get_index(id)); -
cpukit/libmisc/monitor/mon-queue.c
rb3ac6a8d r3652ad35 19 19 20 20 canonical_queue->attributes = rtems_queue->attribute_set; 21 canonical_queue->maximum_message_size = rtems_queue->m aximum_message_size;22 canonical_queue->maximum_pending_messages = rtems_queue->m aximum_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; 24 24 } 25 25 -
cpukit/rtems/include/rtems/rtems/message.h
rb3ac6a8d r3652ad35 40 40 #include <rtems/rtems/attr.h> 41 41 #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> 96 43 97 44 /* … … 100 47 * in a send or urgent fashion. 101 48 */ 102 49 103 50 typedef enum { 104 51 MESSAGE_QUEUE_SEND_REQUEST = 0, 105 52 MESSAGE_QUEUE_URGENT_REQUEST = 1 106 53 } Message_queue_Submit_types; 54 55 /* 56 * The following records define the control block used to manage 57 * each message queue. 58 */ 59 60 typedef 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 71 EXTERN Objects_Information _Message_queue_Information; 107 72 108 73 /* … … 256 221 Objects_Id id, 257 222 void *buffer, 258 unsigned32 *size _p,223 unsigned32 *size, 259 224 unsigned32 option_set, 260 225 rtems_interval timeout … … 278 243 279 244 /* 280 * _Message_queue_Copy_buffer281 *282 * DESCRIPTION:283 *284 * This routine copies the contents of the source message buffer285 * to the destination message buffer.286 */287 288 STATIC INLINE void _Message_queue_Copy_buffer (289 void *source,290 void *destination,291 unsigned32 size292 );293 294 /*295 * _Message_queue_Seize296 *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 in301 * option_set, then the routine returns. Otherwise, the calling task302 * is blocked until a message is available. If a message is returned303 * to the task, then buffer will contain its contents.304 */305 306 boolean _Message_queue_Seize(307 Message_queue_C