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;
0028 int stop;
0029 int now;
0030
0031 put_name( Task_name[ argument ], FALSE );
0032
0033 status = rtems_task_wake_after( 2 + Phases[argument] );
0034 directive_failed( status, "rtems_task_wake_after" );
0035
0036 if ( argument == 6 ) {
0037 rtems_task_suspend( Task_id[5] );
0038 rtems_task_resume( Task_id[5] );
0039 }
0040
0041 start = rtems_clock_get_ticks_since_boot();
0042 printf("AT%" PRIdPTR "-S ticks:%d\n", argument, start);
0043
0044
0045 while(FOREVER) {
0046 now = rtems_clock_get_ticks_since_boot();
0047 if (now >= start + Execution[argument]) break;
0048 }
0049 stop = rtems_clock_get_ticks_since_boot();
0050 printf("P%" PRIdPTR "-F ticks:%d\n", argument, stop);
0051
0052
0053 fflush(stdout);
0054 printf( "Killing task %" PRIdPTR "\n", argument);
0055 rtems_task_exit();
0056 }