+ 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.
This commit is contained in:
Jennifer Averett
1999-11-15 21:25:53 +00:00
parent 0f88857a3a
commit 06380cfeac
8 changed files with 192 additions and 28 deletions

View File

@@ -21,11 +21,35 @@
#include <assert.h>
#include "system.h"
int Preempt_task_Count;
void Preempt_task()
{
ER status;
ER status;
T_RTSK pk_rtsk;
puts( "PREEMPT - exd_tsk" );
exd_tsk( );
assert( 0 );
puts( "PREEMPT - ref_tsk validation" );
status = ref_tsk( &pk_rtsk, PREEMPT_TASK_ID );
assert( status == E_OK );
assert( pk_rtsk.tskpri == PREEMPT_PRIORITY );
assert( pk_rtsk.itskpri == PREEMPT_PRIORITY );
assert( pk_rtsk.task == Preempt_task );
assert( pk_rtsk.stksz >= RTEMS_MINIMUM_STACK_SIZE );
assert( pk_rtsk.tskstat == (TTS_RUN | TTS_RDY) );
if ( Preempt_task_Count == 0 ) {
Preempt_task_Count ++;
puts( "PREEMPT - chg_pri increment priority ");
status = chg_pri( PREEMPT_TASK_ID, (PREEMPT_PRIORITY+1) );
directive_failed( status, "chg_pri" );
puts( "PREEMPT - ext_tsk - going to DORMANT state" );
ext_tsk( );
assert( 0 );
} else {
Preempt_task_Count ++;
puts( "PREEMPT - exd_tsk - Exit and Delete task" );
exd_tsk( );
assert( 0 );
}
}