forked from Imagelibrary/rtems
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* cdtest/main.cc, fileio/init.c, fileio/system.h, pppd/pppdapp.c, ticker/system.h, ticker/tasks.c: Eliminate test routines TICKS_PER_SECOND and get_ticks_per_second() in favor of new rtems_clock_get_ticks_per_second().
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2009-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* cdtest/main.cc, fileio/init.c, fileio/system.h, pppd/pppdapp.c,
|
||||
ticker/system.h, ticker/tasks.c: Eliminate test routines
|
||||
TICKS_PER_SECOND and get_ticks_per_second() in favor of new
|
||||
rtems_clock_get_ticks_per_second().
|
||||
|
||||
2009-08-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* fileio/system.h, ticker/system.h, ticker/ticker.scn: Convert calls to
|
||||
|
||||
@@ -152,7 +152,7 @@ cdtest(void)
|
||||
printf("IO Stream not tested\n");
|
||||
#endif
|
||||
bar = blech;
|
||||
rtems_task_wake_after( 5 * get_ticks_per_second() );
|
||||
rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
|
||||
}
|
||||
|
||||
//
|
||||
@@ -211,7 +211,7 @@ rtems_task main_task(
|
||||
printf( "Caught another exception.\n" );
|
||||
}
|
||||
printf( "Exceptions are working properly.\n" );
|
||||
rtems_task_wake_after( 5 * get_ticks_per_second() );
|
||||
rtems_task_wake_after( 5 * rtems_clock_get_ticks_per_second() );
|
||||
printf( "Global Dtors should be called after this line....\n" );
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ void fileio_list_file(void)
|
||||
printf("\n ******** End of file reached, flen = %d\n",flen);
|
||||
close(fd);
|
||||
|
||||
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec);
|
||||
ticks_per_sec = rtems_clock_get_ticks_per_second();
|
||||
printf("time elapsed for read: %g seconds\n",
|
||||
((double)curr_tick-start_tick)/ticks_per_sec);
|
||||
}
|
||||
@@ -361,7 +361,7 @@ void fileio_write_file(void)
|
||||
/*
|
||||
* get number of ticks per second
|
||||
*/
|
||||
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec);
|
||||
ticks_per_sec = rtems_clock_get_ticks_per_second();
|
||||
|
||||
/*
|
||||
* get path to file to write
|
||||
@@ -520,7 +520,7 @@ void fileio_read_file(void)
|
||||
/*
|
||||
* get number of ticks per second
|
||||
*/
|
||||
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_sec);
|
||||
ticks_per_sec = rtems_clock_get_ticks_per_second();
|
||||
|
||||
/*
|
||||
* get path to file to read
|
||||
|
||||
@@ -100,16 +100,6 @@ rtems_task Init(
|
||||
putchar( '\n' ); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* static inline routine to make obtaining ticks per second easier.
|
||||
*/
|
||||
|
||||
static inline uint32_t get_ticks_per_second( void )
|
||||
{
|
||||
return rtems_clock_get_ticks_per_second();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This allows us to view the "Test_task" instantiations as a set
|
||||
* of numbered tasks by eliminating the number of application
|
||||
|
||||
@@ -90,7 +90,7 @@ static rtems_task pppdapp(rtems_task_argument arg)
|
||||
rtems_event_set out;
|
||||
|
||||
/* initialize ticks per second */
|
||||
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_PER_SECOND, &tickspersecond);
|
||||
tickspersecond = rtems_clock_get_ticks_per_second();
|
||||
if ( tickspersecond == 0 ) {
|
||||
/* ensure value is greater than zero */
|
||||
tickspersecond = 100;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -88,15 +88,6 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
putchar( '\n' ); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* static inline routine to make obtaining ticks per second easier.
|
||||
*/
|
||||
|
||||
static inline uint32_t get_ticks_per_second( void )
|
||||
{
|
||||
return rtems_clock_get_ticks_per_second();
|
||||
}
|
||||
|
||||
/*
|
||||
* This allows us to view the "Test_task" instantiations as a set
|
||||
* of numbered tasks by eliminating the number of application
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -38,6 +38,7 @@ rtems_task Test_task(
|
||||
}
|
||||
put_name( Task_name[ task_index ], FALSE );
|
||||
print_time( " - rtems_clock_get_tod - ", &time, "\n" );
|
||||
status = rtems_task_wake_after( task_index * 5 * get_ticks_per_second() );
|
||||
status = rtems_task_wake_after(
|
||||
task_index * 5 * rtems_clock_get_ticks_per_second() );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user