#define T1_SERVER 0
#define T2_SERVER 0
-void test_loop ( rtems_name name, unsigned int period_length, unsigned int max_j, uint32_t server)
+void test_loop ( unsigned int id, rtems_name name, unsigned int period_length, unsigned int max_j, uint32_t server)
{
rtems_id period;
rtems_status_code status;
while ( 1 ) {
edf_next_period();
if (rtems_rate_monotonic_period(period,period_length)==RTEMS_TIMEOUT)
- puts("P1 - Deadline miss");
+ printf("P%u - Deadline miss", id);
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start);
- sprintf(output1,"P1-S ticks:%u prio:%u",start, (unsigned int) _Per_CPU_Information.executing->current_priority);
+ sprintf(output1,"P%u-S ticks:%u prio:%u", id,start, (unsigned int) _Per_CPU_Information.executing->current_priority);
puts(output1);
if ( start >= TEST_DURATION ) break;
}
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop);
- sprintf(output2,"P1-F ticks:%u",stop);
+ sprintf(output2,"P%u-F ticks:%u",id, stop);
puts(output2);
}
{
rtems_name name;
name = rtems_build_name( 'P', 'E', 'R', 'A' );
- test_loop(name, T1_PER,T1_DUR,T1_SERVER);
+ test_loop(1, name, T1_PER,T1_DUR,T1_SERVER);
}
{
rtems_name name;
name = rtems_build_name( 'P', 'E', 'R', 'B' );
- test_loop(name, T2_PER,T2_DUR,T2_SERVER);
+ test_loop(2, name, T2_PER,T2_DUR,T2_SERVER);
}
#define T1_SERVER 0
#define T2_SERVER 0
-void test_loop ( rtems_name name, unsigned int period_length, unsigned int max_j, uint32_t server)
+void test_loop ( unsigned int id, rtems_name name, unsigned int period_length, unsigned int max_j, uint32_t server)
{
rtems_id period;
rtems_status_code status;
while ( 1 ) {
edf_next_period();
if (rtems_rate_monotonic_period(period,period_length)==RTEMS_TIMEOUT)
- puts("P1 - Deadline miss");
+ printf("P%u - Deadline miss", id);
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start);
- sprintf(output1,"P1-S ticks:%u prio:%u",start, (unsigned int) _Per_CPU_Information.executing->current_priority);
+ sprintf(output1,"P%u-S ticks:%u prio:%u", id,start, (unsigned int) _Per_CPU_Information.executing->current_priority);
puts(output1);
if ( start >= TEST_DURATION ) break;
}
rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &stop);
- sprintf(output2,"P1-F ticks:%u",stop);
+ sprintf(output2,"P%u-F ticks:%u",id, stop);
puts(output2);
}
{
rtems_name name;
name = rtems_build_name( 'P', 'E', 'R', 'A' );
- test_loop(name, T1_PER,T1_DUR,T1_SERVER);
+ test_loop(1, name, T1_PER,T1_DUR,T1_SERVER);
}
{
rtems_name name;
name = rtems_build_name( 'P', 'E', 'R', 'B' );
- test_loop(name, T2_PER,T2_DUR,T2_SERVER);
+ test_loop(2, name, T2_PER,T2_DUR,T2_SERVER);
}