File indexing completed on 2025-05-11 08:24:44
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 #ifdef HAVE_CONFIG_H
0038 #include "config.h"
0039 #endif
0040
0041 #include "system.h"
0042
0043 rtems_task Task_1(
0044 rtems_task_argument argument
0045 )
0046 {
0047 rtems_id ptid_1;
0048 rtems_id ptid_2;
0049 void *buffer_address_1;
0050 void *buffer_address_2;
0051 void *buffer_address_3;
0052 void *buffer_address_4;
0053 rtems_status_code status;
0054
0055 puts_nocr( "TA1 - rtems_partition_ident - partition 1 id = " );
0056 status = rtems_partition_ident(
0057 Partition_name[ 1 ],
0058 RTEMS_SEARCH_ALL_NODES,
0059 &ptid_1
0060 );
0061 directive_failed( status, "rtems_partition_ident of PT1" );
0062 printf( "%08" PRIxrtems_id "\n", ptid_1 );
0063
0064 puts_nocr( "TA1 - rtems_partition_ident - partition 2 id = " );
0065 status = rtems_partition_ident(
0066 Partition_name[ 2 ],
0067 RTEMS_SEARCH_ALL_NODES,
0068 &ptid_2
0069 );
0070 directive_failed( status, "rtems_partition_ident of PT2" );
0071 printf( "%08" PRIxrtems_id "\n", ptid_2 );
0072
0073 puts_nocr(
0074 "TA1 - rtems_partition_get_buffer - buffer 1 from partition 1 - "
0075 );
0076 status = rtems_partition_get_buffer( ptid_1, &buffer_address_1 );
0077 directive_failed( status, "rtems_partition_get_buffer" );
0078 Put_address_from_area_1( buffer_address_1 );
0079 new_line;
0080
0081 puts_nocr(
0082 "TA1 - rtems_partition_get_buffer - buffer 2 from partition 1 - "
0083 );
0084 status = rtems_partition_get_buffer( ptid_1, &buffer_address_2 );
0085 directive_failed( status, "rtems_partition_get_buffer" );
0086 Put_address_from_area_1( buffer_address_2 );
0087 new_line;
0088
0089 puts_nocr(
0090 "TA1 - rtems_partition_get_buffer - buffer 1 from partition 2 - "
0091 );
0092 status = rtems_partition_get_buffer( ptid_2, &buffer_address_3 );
0093 directive_failed( status, "rtems_partition_get_buffer" );
0094 Put_address_from_area_2( buffer_address_3 );
0095 new_line;
0096
0097 puts_nocr(
0098 "TA1 - rtems_partition_get_buffer - buffer 2 from partition 2 - "
0099 );
0100 status = rtems_partition_get_buffer( ptid_2, &buffer_address_4 );
0101 directive_failed( status, "rtems_partition_get_buffer" );
0102 Put_address_from_area_2( buffer_address_4 );
0103 new_line;
0104
0105 puts_nocr(
0106 "TA1 - rtems_partition_return_buffer - buffer 1 to partition 1 - "
0107 );
0108 Put_address_from_area_1( buffer_address_1 );
0109 new_line;
0110 status = rtems_partition_return_buffer( ptid_1, buffer_address_1 );
0111 directive_failed( status, "rtems_partition_return_buffer" );
0112
0113 puts_nocr(
0114 "TA1 - rtems_partition_return_buffer - buffer 2 to partition 1 - "
0115 );
0116 Put_address_from_area_1( buffer_address_2 );
0117 new_line;
0118 status = rtems_partition_return_buffer( ptid_1, buffer_address_2 );
0119 directive_failed( status, "rtems_partition_return_buffer" );
0120
0121 puts_nocr(
0122 "TA1 - rtems_partition_return_buffer - buffer 1 to partition 2 - "
0123 );
0124 Put_address_from_area_2( buffer_address_3 );
0125 new_line;
0126 status = rtems_partition_return_buffer( ptid_2, buffer_address_3 );
0127 directive_failed( status, "rtems_partition_return_buffer" );
0128
0129 puts_nocr(
0130 "TA1 - rtems_partition_return_buffer - buffer 2 to partition 2 - "
0131 );
0132 Put_address_from_area_2( buffer_address_4 );
0133 new_line;
0134 status = rtems_partition_return_buffer( ptid_2, buffer_address_4 );
0135 directive_failed( status, "rtems_partition_return_buffer" );
0136
0137 puts( "TA1 - rtems_partition_delete - delete partition 1"
0138 );
0139 status = rtems_partition_delete( ptid_1 );
0140 directive_failed( status, "rtems_partition_delete" );
0141
0142 puts( "TA1 - rtems_partition_delete - delete partition 2"
0143 );
0144 status = rtems_partition_delete( ptid_2 );
0145 directive_failed( status, "rtems_partition_delete" );
0146
0147 TEST_END();
0148 rtems_test_exit( 0 );
0149 }