Changeset 3ad7602e in rtems


Ignore:
Timestamp:
12/20/99 15:21:31 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8b91282
Parents:
947c27aa
Message:

Modifications to avoid having the size of the Buffer_addresses array
too small when OPERATION_COUNT is less than 10.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/tmtests/tm20/task1.c

    r947c27aa r3ad7602e  
    1313#define TEST_INIT
    1414#include "system.h"
     15#include <assert.h>
    1516
    1617rtems_device_major_number _STUB_major = 1;
     
    2021rtems_unsigned8  Region_area[ 2048 ] CPU_STRUCTURE_ALIGNMENT;
    2122
     23#define PARTITION_SIZE         2048
     24#define PARTITION_ELEMENT_SIZE  128
     25#define PARTITION_BUFFER_POINTERS \
     26    ((PARTITION_SIZE / PARTITION_ELEMENT_SIZE) + 2)
     27
    2228rtems_id         Partition_id;
    2329rtems_name       Partition_name;
    24 rtems_unsigned8  Partition_area[ 2048 ] CPU_STRUCTURE_ALIGNMENT;
    25 
    26 void            *Buffer_address_1;
    27 void            *Buffer_address_2;
    28 void            *Buffer_address_3;
    29 void            *Buffer_address_4;
     30rtems_unsigned8  Partition_area[ PARTITION_SIZE ] CPU_STRUCTURE_ALIGNMENT;
     31
     32void  *Buffer_address_1;
     33void  *Buffer_address_2;
     34void  *Buffer_address_3;
     35void  *Buffer_address_4;
    3036
    3137rtems_unsigned32 buffer_count;
    3238
    33 void            *Buffer_addresses[ OPERATION_COUNT+1 ];
     39void  *Buffer_addresses[ PARTITION_BUFFER_POINTERS ];
    3440
    3541rtems_task Task_1(
     
    96102      Partition_name,
    97103      Partition_area,
    98       2048,
     104      PARTITION_SIZE,
    99105      128,
    100106      RTEMS_DEFAULT_ATTRIBUTES,
     
    155161
    156162    buffer_count++;
     163
     164    assert( buffer_count < PARTITION_BUFFER_POINTERS );
    157165  }
    158166
     
    210218             &Buffer_address_2
    211219           );
    212   directive_failed( status, "region_get_semgent" );
     220  directive_failed( status, "region_get_segment" );
    213221
    214222  Timer_initialize();
  • testsuites/tmtests/tm20/task1.c

    r947c27aa r3ad7602e  
    1313#define TEST_INIT
    1414#include "system.h"
     15#include <assert.h>
    1516
    1617rtems_device_major_number _STUB_major = 1;
     
    2021rtems_unsigned8  Region_area[ 2048 ] CPU_STRUCTURE_ALIGNMENT;
    2122
     23#define PARTITION_SIZE         2048
     24#define PARTITION_ELEMENT_SIZE  128
     25#define PARTITION_BUFFER_POINTERS \
     26    ((PARTITION_SIZE / PARTITION_ELEMENT_SIZE) + 2)
     27
    2228rtems_id         Partition_id;
    2329rtems_name       Partition_name;
    24 rtems_unsigned8  Partition_area[ 2048 ] CPU_STRUCTURE_ALIGNMENT;
    25 
    26 void            *Buffer_address_1;
    27 void            *Buffer_address_2;
    28 void            *Buffer_address_3;
    29 void            *Buffer_address_4;
     30rtems_unsigned8  Partition_area[ PARTITION_SIZE ] CPU_STRUCTURE_ALIGNMENT;
     31
     32void  *Buffer_address_1;
     33void  *Buffer_address_2;
     34void  *Buffer_address_3;
     35void  *Buffer_address_4;
    3036
    3137rtems_unsigned32 buffer_count;
    3238
    33 void            *Buffer_addresses[ OPERATION_COUNT+1 ];
     39void  *Buffer_addresses[ PARTITION_BUFFER_POINTERS ];
    3440
    3541rtems_task Task_1(
     
    96102      Partition_name,
    97103      Partition_area,
    98       2048,
     104      PARTITION_SIZE,
    99105      128,
    100106      RTEMS_DEFAULT_ATTRIBUTES,
     
    155161
    156162    buffer_count++;
     163
     164    assert( buffer_count < PARTITION_BUFFER_POINTERS );
    157165  }
    158166
     
    210218             &Buffer_address_2
    211219           );
    212   directive_failed( status, "region_get_semgent" );
     220  directive_failed( status, "region_get_segment" );
    213221
    214222  Timer_initialize();
Note: See TracChangeset for help on using the changeset viewer.