Ignore:
Timestamp:
Nov 15, 1999, 9:25:53 PM (20 years ago)
Author:
Jennifer Averett <Jennifer.Averett@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
e672263
Parents:
0f88857
Message:

+ Added check that a task could be sent to a dormant state

then sta_tsk used to restart the task to its initial state.

+ Added calls to ref_tsk to yellow paths for suspended and

ready but not running tasks.

+ Fixed output file to correctly state test name
+ Added priority of preempt to the header file. Allows ref_tsk verification.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/itrontests/itrontask03/preempt.c

    r0f88857 r06380cfe  
    2222#include "system.h"
    2323
     24int Preempt_task_Count;
     25
    2426void Preempt_task()
    2527{
    26   ER   status;
     28  ER       status;
     29  T_RTSK   pk_rtsk;
    2730
    28   puts( "PREEMPT - exd_tsk"  );
    29   exd_tsk(  );
    30   assert( 0 );
     31  puts( "PREEMPT - ref_tsk validation"  );
     32  status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
     33  assert( status          == E_OK );
     34  assert( pk_rtsk.tskpri  == PREEMPT_PRIORITY );
     35  assert( pk_rtsk.itskpri == PREEMPT_PRIORITY );
     36  assert( pk_rtsk.task    == Preempt_task );
     37  assert( pk_rtsk.stksz   >= RTEMS_MINIMUM_STACK_SIZE );
     38  assert( pk_rtsk.tskstat == (TTS_RUN | TTS_RDY) );
     39
     40  if ( Preempt_task_Count == 0 ) {
     41    Preempt_task_Count ++;
     42    puts( "PREEMPT - chg_pri increment priority ");
     43    status = chg_pri( PREEMPT_TASK_ID, (PREEMPT_PRIORITY+1) );
     44    directive_failed( status, "chg_pri" );
     45    puts( "PREEMPT - ext_tsk - going to DORMANT state" );
     46    ext_tsk( );
     47    assert( 0 );
     48  } else {
     49    Preempt_task_Count ++;
     50    puts( "PREEMPT - exd_tsk - Exit and Delete task" );
     51    exd_tsk(  );
     52    assert( 0 );
     53  }
    3154}
     55
Note: See TracChangeset for help on using the changeset viewer.