Changeset c1e350c in rtems


Ignore:
Timestamp:
Nov 21, 2012, 9:59:32 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
55a36b7
Parents:
f4539aa
git-author:
Sebastian Huber <sebastian.huber@…> (11/21/12 09:59:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/21/12 15:38:34)
Message:

sptests/spcbssched02: PR2081: Workaround

Avoid uninitialized stack variable. This is not a proper fix. It is
not clear what the task should do if argument != 1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/spcbssched02/task_periodic.c

    rf4539aa rc1e350c  
    3131  int start, stop, now;
    3232
    33   rtems_cbs_server_id server_id, tsid;
     33  rtems_cbs_server_id server_id = 0, tsid;
    3434  rtems_cbs_parameters params, tparams;
    3535
     
    116116      if ( now >= start + Execution ) break;
    117117
    118       if ( rtems_cbs_get_execution_time( server_id, &exec_time, &abs_time ) )
    119         printf( "ERROR: GET EXECUTION TIME FAILED\n" );
    120       if ( rtems_cbs_get_remaining_budget( server_id, &remaining_budget) )
    121         printf( "ERROR: GET REMAINING BUDGET FAILED\n" );
    122       if ( (remaining_budget + exec_time) > (Execution + 1) ) {
    123         printf( "ERROR: REMAINING BUDGET AND EXECUTION TIME MISMATCH\n" );
    124         rtems_test_exit( 0 );
     118      if ( server_id != 0 ) {
     119        if ( rtems_cbs_get_execution_time( server_id, &exec_time, &abs_time ) )
     120          printf( "ERROR: GET EXECUTION TIME FAILED\n" );
     121        if ( rtems_cbs_get_remaining_budget( server_id, &remaining_budget) )
     122          printf( "ERROR: GET REMAINING BUDGET FAILED\n" );
     123        if ( (remaining_budget + exec_time) > (Execution + 1) ) {
     124          printf( "ERROR: REMAINING BUDGET AND EXECUTION TIME MISMATCH\n" );
     125          rtems_test_exit( 0 );
     126        }
    125127      }
    126128    }
Note: See TracChangeset for help on using the changeset viewer.