File indexing completed on 2025-05-11 08:24:35
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 #ifdef HAVE_CONFIG_H
0045 #include "config.h"
0046 #endif
0047
0048 #define CONFIGURE_INIT
0049 #include "system.h"
0050
0051 uint8_t my_partition[0x30000] CPU_STRUCTURE_ALIGNMENT;
0052
0053 rtems_task Init(
0054 rtems_task_argument argument
0055 )
0056 {
0057 rtems_id junk_id;
0058 rtems_status_code status;
0059
0060 printf(
0061 "\n\n*** TEST 11 -- NODE %" PRIu32 " ***\n",
0062 rtems_object_get_local_node()
0063 );
0064
0065 Task_name[ 1 ] = rtems_build_name( '1', '1', '1', ' ' );
0066 Task_name[ 2 ] = rtems_build_name( '2', '2', '2', ' ' );
0067
0068 Queue_name[ 1 ] = rtems_build_name( 'M', 'S', 'G', ' ' );
0069
0070 Semaphore_name[ 1 ] = rtems_build_name( 'S', 'E', 'M', ' ' );
0071
0072 if ( rtems_object_get_local_node() == 1 ) {
0073 puts( "Attempting to create Test_task (Global)" );
0074 status = rtems_task_create(
0075 Task_name[ 1 ],
0076 1,
0077 RTEMS_MINIMUM_STACK_SIZE,
0078 RTEMS_DEFAULT_MODES,
0079 RTEMS_GLOBAL,
0080 &junk_id
0081 );
0082 fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_task_create" );
0083 puts( "rtems_task_create correctly returned RTEMS_TOO_MANY" );
0084
0085 puts( "Attempting to create Message Queue (Global)" );
0086 status = rtems_message_queue_create(
0087 Queue_name[ 1 ],
0088 3,
0089 16,
0090 RTEMS_GLOBAL,
0091 &junk_id
0092 );
0093 fatal_directive_status(
0094 status,
0095 RTEMS_TOO_MANY,
0096 "rtems_message_queue_create"
0097 );
0098 puts( "rtems_message_queue_create correctly returned RTEMS_TOO_MANY" );
0099
0100 puts( "Attempting to create Semaphore (Global)" );
0101 status = rtems_semaphore_create(
0102 Semaphore_name[ 1 ],
0103 1,
0104 RTEMS_GLOBAL,
0105 RTEMS_NO_PRIORITY,
0106 &junk_id
0107 );
0108 fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_semaphore_create" );
0109 puts( "rtems_semaphore_create correctly returned RTEMS_TOO_MANY" );
0110
0111 puts( "Attempting to create Partition (Global)" );
0112 status = rtems_partition_create(
0113 1,
0114 (uint8_t *) my_partition,
0115 128,
0116 64,
0117 RTEMS_GLOBAL,
0118 &junk_id
0119 );
0120 fatal_directive_status( status, RTEMS_TOO_MANY, "rtems_partition_create" );
0121 puts( "rtems_partition_create correctly returned RTEMS_TOO_MANY" );
0122 }
0123 puts( "*** END OF TEST 11 ***" );
0124 rtems_test_exit( 0 );
0125 }