forked from Imagelibrary/rtems
* sp01/init.c, sp01/sp01.doc, sp01/system.h, sp01/task1.c, sp02/init.c, sp02/preempt.c, sp02/sp02.doc, sp02/system.h, sp02/task1.c, sp02/task2.c, sp02/task3.c, sp03/init.c, sp03/sp03.doc, sp03/system.h, sp03/task1.c, sp03/task2.c, sp04/init.c, sp04/sp04.doc, sp04/system.h, sp04/task1.c, sp04/task2.c, sp04/task3.c, sp04/tswitch.c, sp05/init.c, sp05/sp05.doc, sp05/system.h, sp05/task1.c, sp05/task2.c, sp05/task3.c, sp06/init.c, sp06/sp06.doc, sp06/system.h, sp06/task1.c, sp06/task2.c, sp06/task3.c, sp07/init.c, sp07/sp07.doc, sp07/system.h, sp07/task1.c, sp07/task2.c, sp07/task3.c, sp07/task4.c, sp07/taskexit.c, sp07/tcreate.c, sp07/tdelete.c, sp07/trestart.c, sp07/tstart.c, sp08/init.c, sp08/sp08.doc, sp08/system.h, sp08/task1.c, sp09/delay.c, sp09/init.c, sp09/isr.c, sp09/screen01.c, sp09/screen02.c, sp09/screen03.c, sp09/screen04.c, sp09/screen05.c, sp09/screen06.c, sp09/screen07.c, sp09/screen08.c, sp09/screen09.c, sp09/screen10.c, sp09/screen11.c, sp09/screen12.c, sp09/screen13.c, sp09/screen14.c, sp09/sp09.doc, sp09/system.h, sp09/task1.c, sp09/task2.c, sp09/task3.c, sp09/task4.c, sp11/init.c, sp11/sp11.doc, sp11/system.h, sp11/task1.c, sp11/task2.c, sp11/timer.c, sp12/init.c, sp12/pridrv.c, sp12/pritask.c, sp12/sp12.doc, sp12/system.h, sp12/task1.c, sp12/task2.c, sp12/task3.c, sp12/task4.c, sp12/task5.c, sp13/fillbuff.c, sp13/init.c, sp13/putbuff.c, sp13/sp13.doc, sp13/system.h, sp13/task1.c, sp13/task2.c, sp13/task3.c, sp14/asr.c, sp14/init.c, sp14/sp14.doc, sp14/system.h, sp14/task1.c, sp14/task2.c, sp15/init.c, sp15/sp15.doc, sp15/system.h, sp15/task1.c, sp16/init.c, sp16/sp16.doc, sp16/system.h, sp16/task1.c, sp16/task2.c, sp16/task3.c, sp16/task4.c, sp16/task5.c, sp17/asr.c, sp17/init.c, sp17/sp17.doc, sp17/system.h, sp17/task1.c, sp17/task2.c, sp19/first.c, sp19/fptask.c, sp19/fptest.h, sp19/init.c, sp19/inttest.h, sp19/sp19.doc, sp19/system.h, sp19/task1.c, sp20/getall.c, sp20/init.c, sp20/sp20.doc, sp20/system.h, sp20/task1.c, sp21/init.c, sp21/sp21.doc, sp21/system.h, sp21/task1.c, sp22/delay.c, sp22/init.c, sp22/prtime.c, sp22/sp22.doc, sp22/system.h, sp22/task1.c, sp23/init.c, sp23/sp23.doc, sp23/system.h, sp23/task1.c, sp24/init.c, sp24/resume.c, sp24/sp24.doc, sp24/system.h, sp24/task1.c, sp25/init.c, sp25/sp25.doc, sp25/system.h, sp25/task1.c, sp26/init.c, sp26/sp26.doc, sp26/system.h, sp26/task1.c, sp30/init.c, sp30/resume.c, sp30/sp30.doc, sp30/system.h, sp30/task1.c, sp31/delay.c, sp31/init.c, sp31/prtime.c, sp31/sp31.doc, sp31/system.h, sp31/task1.c, sp32/init.c, spfatal/fatal.c, spfatal/init.c, spfatal/puterr.c, spfatal/spfatal.doc, spfatal/system.h, spfatal/task1.c, spsize/getint.c, spsize/init.c, spsize/size.c, spsize/system.h: URL for license changed.
180 lines
4.6 KiB
C
180 lines
4.6 KiB
C
/* Screen1
|
|
*
|
|
* This routine generates error screen 1 for test 9.
|
|
*
|
|
* Input parameters: NONE
|
|
*
|
|
* Output parameters: NONE
|
|
*
|
|
* COPYRIGHT (c) 1989-1999.
|
|
* On-Line Applications Research Corporation (OAR).
|
|
*
|
|
* The license and distribution terms for this file may be
|
|
* found in the file LICENSE in this distribution or at
|
|
* http://www.rtems.com/license/LICENSE.
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#include "system.h"
|
|
|
|
void Screen1()
|
|
{
|
|
rtems_unsigned32 notepad_value;
|
|
rtems_id self_id;
|
|
rtems_task_priority previous_priority;
|
|
rtems_status_code status;
|
|
|
|
status = rtems_task_delete( 100 );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_delete with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_delete - RTEMS_INVALID_ID" );
|
|
|
|
status = rtems_task_get_note( RTEMS_SELF, 100, ¬epad_value );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_NUMBER,
|
|
"rtems_task_get_note with illegal notepad"
|
|
);
|
|
puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_NUMBER" );
|
|
|
|
status = rtems_task_get_note( 100, RTEMS_NOTEPAD_LAST, ¬epad_value );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_get_note with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_get_note - RTEMS_INVALID_ID" );
|
|
|
|
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &self_id );
|
|
directive_failed( status, "rtems_task_ident of self" );
|
|
|
|
if ( self_id != Task_id[ 1 ] ) {
|
|
puts( "ERROR - rtems_task_ident - incorrect ID returned!" );
|
|
}
|
|
puts( "TA1 - rtems_task_ident - current task RTEMS_SUCCESSFUL" );
|
|
|
|
status = rtems_task_ident( 100, RTEMS_SEARCH_ALL_NODES, &Junk_id );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_NAME,
|
|
"rtems_task_ident with illegal name (local)"
|
|
);
|
|
puts( "TA1 - rtems_task_ident - global RTEMS_INVALID_NAME" );
|
|
|
|
status = rtems_task_ident( 100, 1, &Junk_id );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_NAME,
|
|
"rtems_task_ident with illegal name (global)"
|
|
);
|
|
puts( "TA1 - rtems_task_ident - local RTEMS_INVALID_NAME" );
|
|
|
|
/*
|
|
* This one case is different if MP is enabled/disabled.
|
|
*/
|
|
|
|
status = rtems_task_ident( 100, 2, &Junk_id );
|
|
#if defined(RTEMS_MULTIPROCESSING)
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_NODE,
|
|
"rtems_task_ident with illegal node"
|
|
);
|
|
#else
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_NAME,
|
|
"rtems_task_ident with illegal node"
|
|
);
|
|
#endif
|
|
puts( "TA1 - rtems_task_ident - RTEMS_INVALID_NODE" );
|
|
|
|
status = rtems_task_restart( 100, 0 );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_restart with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_restart - RTEMS_INVALID_ID" );
|
|
|
|
status = rtems_task_resume( 100 );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_resume with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_resume - RTEMS_INVALID_ID" );
|
|
|
|
status = rtems_task_resume( RTEMS_SELF );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INCORRECT_STATE,
|
|
"rtems_task_resume of ready task"
|
|
);
|
|
puts( "TA1 - rtems_task_resume - RTEMS_INCORRECT_STATE" );
|
|
|
|
status = rtems_task_set_priority( RTEMS_SELF, 512, &previous_priority );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_PRIORITY,
|
|
"rtems_task_set_priority with illegal priority"
|
|
);
|
|
puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_PRIORITY" );
|
|
|
|
status = rtems_task_set_priority( 100, 8, &previous_priority );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_set_priority with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_set_priority - RTEMS_INVALID_ID" );
|
|
|
|
status = rtems_task_set_note(
|
|
RTEMS_SELF,
|
|
RTEMS_NOTEPAD_LAST+10,
|
|
notepad_value
|
|
);
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_NUMBER,
|
|
"rtems_task_set_note with illegal notepad"
|
|
);
|
|
puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_NUMBER" );
|
|
|
|
status = rtems_task_set_note( 100, RTEMS_NOTEPAD_LAST, notepad_value );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_set_note with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_set_note - RTEMS_INVALID_ID" );
|
|
|
|
status = rtems_task_start( 100, Task_1, 0 );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_start with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_start - RTEMS_INVALID_ID" );
|
|
|
|
status = rtems_task_start( 0, Task_1, 0 );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INCORRECT_STATE,
|
|
"rtems_task_start of ready task"
|
|
);
|
|
puts( "TA1 - rtems_task_start - RTEMS_INCORRECT_STATE" );
|
|
|
|
status = rtems_task_suspend( 100 );
|
|
fatal_directive_status(
|
|
status,
|
|
RTEMS_INVALID_ID,
|
|
"rtems_task_suspend with illegal id"
|
|
);
|
|
puts( "TA1 - rtems_task_suspend - RTEMS_INVALID_ID" );
|
|
}
|