File indexing completed on 2025-05-11 08:24:46
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifdef HAVE_CONFIG_H
0017 #include "config.h"
0018 #endif
0019
0020 #include "system.h"
0021
0022 rtems_task Tasks_Aperiodic(
0023 rtems_task_argument argument
0024 )
0025 {
0026 rtems_status_code status;
0027 int start, stop, now;
0028
0029 put_name( Task_name[ argument ], FALSE );
0030
0031 status = rtems_task_wake_after( 2 + Phases[argument] );
0032 directive_failed( status, "rtems_task_wake_after" );
0033
0034 start = rtems_clock_get_ticks_since_boot();
0035 printf("AT%" PRIdPTR "-S ticks:%d\n", argument, start);
0036
0037
0038 while(FOREVER) {
0039 now = rtems_clock_get_ticks_since_boot();
0040 if (now >= start + Execution[argument]) break;
0041 }
0042 stop = rtems_clock_get_ticks_since_boot();
0043 printf("P%" PRIdPTR "-F ticks:%d\n", argument, stop);
0044
0045
0046 fflush(stdout);
0047 printf( "Killing task %" PRIdPTR "\n", argument);
0048 rtems_task_exit();
0049 }