Files
rtems/testsuites/sptests/sp19/first.c
Ralf Corsepius c87608fd82 2004-03-30 Ralf Corsepius <ralf_corsepius@rtems.org>
* sp02/task1.c, sp04/system.h, sp04/task1.c, sp04/tswitch.c,
	sp05/task1.c, sp06/task1.c, sp09/screen01.c, sp09/screen07.c,
	sp09/screen12.c, sp09/system.h, sp09/task3.c, sp11/task1.c,
	sp12/pridrv.c, sp12/pritask.c, sp12/system.h, sp13/task1.c,
	sp13/task2.c, sp13/task3.c, sp14/system.h, sp15/system.h,
	sp16/system.h, sp17/system.h, sp19/first.c, sp19/fptask.c,
	sp19/inttest.h, sp19/system.h, sp19/task1.c, sp20/init.c,
	sp20/system.h, sp20/task1.c, sp23/system.h, sp24/init.c,
	sp25/system.h, sp30/init.c, spfatal/fatal.c, spfatal/puterr.c,
	spfatal/system.h, spsize/size.c: Convert to using c99 fixed size
	types.
2004-03-30 11:15:35 +00:00

66 lines
1.7 KiB
C

/* First_FP_task
*
* This routine serves as a floating point test task. It verifies the
* basic task switching capabilities of the executive when floating
* point is configured.
*
* Input parameters:
* argument - task argument
*
* 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"
#include "fptest.h"
#include "inttest.h"
rtems_task First_FP_task(
rtems_task_argument argument
)
{
rtems_status_code status;
rtems_id tid;
rtems_time_of_day time;
uint32_t task_index;
INTEGER_DECLARE;
FP_DECLARE;
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
directive_failed( status, "rtems_task_ident" );
task_index = task_number( tid );
INTEGER_LOAD( INTEGER_factors[ task_index ] );
FP_LOAD( FP_factors[ task_index ] );
put_name( Task_name[ task_index ], FALSE );
printf( " - integer base = (0x%x)\n", INTEGER_factors[ task_index ] );
put_name( Task_name[ task_index ], FALSE );
#if ( RTEMS_HAS_HARDWARE_FP == 1 )
printf( " - float base = (%g)\n", FP_factors[ task_index ] );
#else
printf( " - float base = (NA)\n" );
#endif
if ( argument == 0 ) {
status = rtems_task_restart( RTEMS_SELF, 1 );
directive_failed( status, "rtems_task_restart of RTEMS_SELF" );
} else {
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
status = rtems_clock_set( &time );
directive_failed( status, "rtems_clock_set" );
status = rtems_task_delete( RTEMS_SELF );
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
}
}