Changeset 82478ffc in rtems


Ignore:
Timestamp:
Oct 2, 2008, 8:57:28 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
2cc1b43
Parents:
4c09f4b
Message:

2008-10-02 Joel Sherrill <joel.sherrill@…>

  • sp09/screen01.c, sp09/screen12.c, sp25/system.h, sp25/task1.c, sp28/init.c, sp39/init.c, sp41/init.c, spfatal01/testcase.h, spfatal08/testcase.h: Change size_t to ssize_t on all Heap, Workspace and Region calls. On 16-bit architectures, size_t can be 16-bits which would limit sizes to 64K. Also address constants which overflowed on 16-bit integer targets.
Location:
testsuites/sptests
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/ChangeLog

    r4c09f4b r82478ffc  
     12008-10-02      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * sp09/screen01.c, sp09/screen12.c, sp25/system.h, sp25/task1.c,
     4        sp28/init.c, sp39/init.c, sp41/init.c, spfatal01/testcase.h,
     5        spfatal08/testcase.h: Change size_t to ssize_t on all Heap, Workspace
     6        and Region calls. On 16-bit architectures, size_t can be 16-bits
     7        which would limit sizes to 64K. Also address constants which
     8        overflowed on 16-bit integer targets.
     9
    1102008-10-01      Joel Sherrill <joel.sherrill@oarcorp.com>
    211
  • testsuites/sptests/sp09/screen01.c

    r4c09f4b r82478ffc  
    6363
    6464  status = rtems_task_get_note(
    65     _RTEMS_tasks_Information.minimum_id + (3<<OBJECTS_API_START_BIT),
     65    _RTEMS_tasks_Information.minimum_id + (3L<<OBJECTS_API_START_BIT),
    6666    RTEMS_NOTEPAD_LAST,
    6767    &notepad_value
  • testsuites/sptests/sp09/screen12.c

    r4c09f4b r82478ffc  
    2727  uint32_t                good_front_flag;
    2828  uint32_t                offset;
    29   size_t                  segment_size;
     29  ssize_t                 segment_size;
    3030  rtems_status_code       status;
    3131  Heap_Information_block  the_info;
  • testsuites/sptests/sp25/system.h

    r4c09f4b r82478ffc  
    4545TEST_EXTERN rtems_name Region_name[ 2 ];  /* array of region names */
    4646
    47 TEST_EXTERN uint8_t   Area_1[64000]  CPU_STRUCTURE_ALIGNMENT;
     47TEST_EXTERN uint8_t   Area_1[1024]  CPU_STRUCTURE_ALIGNMENT;
    4848
    4949#define BASE_PRIORITY 140
  • testsuites/sptests/sp25/task1.c

    r4c09f4b r82478ffc  
    3434  rtems_id                region_id;
    3535  Heap_Information_block  region_info;
    36   size_t                  segment_size;
     36  ssize_t                 segment_size;
    3737  rtems_status_code       status;
    3838
  • testsuites/sptests/sp28/init.c

    r4c09f4b r82478ffc  
    3636subtask (rtems_task_argument arg)
    3737{
    38   int localvar = arg;
     38  uintptr_t localvar = arg;
    3939  int i;
    4040  rtems_status_code sc;
     
    5050    localvar++;
    5151    rtems_task_wake_after (0);
    52     taskvar = (void *)((int)taskvar + 1);
     52    taskvar = (void *)((uintptr_t)taskvar + 1);
    5353    rtems_task_wake_after (0);
    54     if ((int)taskvar != localvar) {
    55       printf ("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
     54    if ((uintptr_t)taskvar != localvar) {
     55      printf ("Task:%d taskvar:%d localvar:%d\n",
     56        arg, (uintptr_t)taskvar, localvar);
    5657      rtems_task_suspend (RTEMS_SELF);
    5758    }
     
    6162  directive_failed( sc, "task variable delete" );
    6263
    63   if ((int)taskvar == localvar) {
    64     printf("Task:%d deleted taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
     64  if ((uintptr_t)taskvar == localvar) {
     65    printf("Task:%d deleted taskvar:%d localvar:%d\n",
     66      arg, (uintptr_t)taskvar, localvar);
    6567    nRunning--;
    6668    rtems_task_suspend (RTEMS_SELF);
     
    7375    if (nRunning <= 1)
    7476      break;
    75     if ((int)taskvar == localvar) {
    76       printf("Task:%d taskvar:%d localvar:%d\n", arg, (int)taskvar, localvar);
     77    if ((uintptr_t)taskvar == localvar) {
     78      printf("Task:%d taskvar:%d localvar:%d\n",
     79        arg, (uintptr_t)taskvar, localvar);
    7780      nRunning--;
    7881      rtems_task_suspend(RTEMS_SELF);
  • testsuites/sptests/sp39/init.c

    r4c09f4b r82478ffc  
    7171  int                   i;
    7272  int                   max;
    73   int                   iterations = 0;
     73  uint32_t              iterations = 0;
    7474
    7575  puts( "\n\n*** TEST 39 ***" );
     
    117117
    118118    /* with our clock tick, this is about 30 seconds */
    119     if ( ++iterations >= 4 * 1000 * 30)
     119    if ( ++iterations >= 4L * 1000L * 30L)
    120120      break;
    121121  }
     
    151151
    152152    /* with our clock tick, this is about 30 seconds */
    153     if ( ++iterations >= 4 * 1000 * 30)
     153    if ( ++iterations >= 4L * 1000L * 30L)
    154154      break;
    155155  }
     
    184184
    185185    /* with our clock tick, this is about 30 seconds */
    186     if ( ++iterations >= 4 * 1000 * 30)
     186    if ( ++iterations >= 4L * 1000L * 30L)
    187187      break;
    188188
  • testsuites/sptests/sp41/init.c

    r4c09f4b r82478ffc  
    7575  int                   i;
    7676  int                   max;
    77   int                   iterations = 0;
     77  uint32_t              iterations = 0;
    7878
    7979  puts( "\n\n*** TEST 41 ***" );
     
    120120
    121121    /* with our clock tick, this is about 30 seconds */
    122     if ( ++iterations >= 4 * 1000 * 30)
     122    if ( ++iterations >= 4L * 1000L * 30L)
    123123      break;
    124124  }
     
    156156
    157157    /* with our clock tick, this is about 30 seconds */
    158     if ( ++iterations >= 4 * 1000 * 30)
     158    if ( ++iterations >= 4L * 1000L * 30L)
    159159      break;
    160160  }
     
    189189
    190190    /* with our clock tick, this is about 30 seconds */
    191     if ( ++iterations >= 4 * 1000 * 30)
     191    if ( ++iterations >= 4L * 1000L * 30L)
    192192      break;
    193193  }
  • testsuites/sptests/spfatal01/testcase.h

    r4c09f4b r82478ffc  
    1313rtems_initialization_tasks_table Initialization_tasks[] = {
    1414  { rtems_build_name('I', 'N', 'I', ' '),
    15     64 * 1024 * 1024,
     15    32UL * 1024UL,
    1616    1,
    1717    RTEMS_DEFAULT_ATTRIBUTES,
  • testsuites/sptests/spfatal08/testcase.h

    r4c09f4b r82478ffc  
    3030#define FATAL_ERROR_EXPECTED_ERROR       INTERNAL_ERROR_WORKSPACE_ALLOCATION
    3131
    32 char Workspace[ 64 * 1024 ] CPU_STRUCTURE_ALIGNMENT;
     32char Workspace[ 256 ] CPU_STRUCTURE_ALIGNMENT;
    3333
    3434void force_error()
Note: See TracChangeset for help on using the changeset viewer.