From: Petr Benes Date: Fri, 13 May 2011 00:11:37 +0000 (+0200) Subject: Test_EDF: test updated because of the latest refactoring, works ok X-Git-Url: http://rtime.felk.cvut.cz/gitweb/rtems-pluggable-edf.git/commitdiff_plain/4df33563c47af83d32f7e2897eff9fb9c4264689 Test_EDF: test updated because of the latest refactoring, works ok --- diff --git a/src/Makefile.omk b/src/Makefile.omk index 3d13c11..9a522ab 100644 --- a/src/Makefile.omk +++ b/src/Makefile.omk @@ -1,2 +1,3 @@ -SUBDIRS = system_opt libbar appfoo edf test_edf test_cbs +SUBDIRS = system_opt libbar appfoo edf test_edf +#test_cbs diff --git a/src/test_edf/task.c b/src/test_edf/task.c index 9d0b34d..dba6668 100644 --- a/src/test_edf/task.c +++ b/src/test_edf/task.c @@ -20,10 +20,8 @@ #define T2_DUR 500 #define T1_PER 7 #define T2_PER 10 -#define T1_SERVER 0 -#define T2_SERVER 0 -void test_loop ( unsigned int id, 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) { rtems_id period; rtems_status_code status; @@ -41,10 +39,9 @@ void test_loop ( unsigned int id, rtems_name name, unsigned int period_length, u } max_i = 1000; - edf_deadline_init(period_length, server, NULL); + edf_deadline_init(name, &period); while ( 1 ) { - edf_next_period(); - if (rtems_rate_monotonic_period(period,period_length)==RTEMS_TIMEOUT) + if (edf_next_period(period,period_length, 0)) printf("P%u - Deadline miss", id); rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &start); @@ -72,8 +69,7 @@ void test_loop ( unsigned int id, rtems_name name, unsigned int period_length, u } /* missed period so delete period and SELF */ - status = rtems_rate_monotonic_delete( period ); - edf_deadline_cancel(); + status = edf_deadline_cancel(period); if ( status != RTEMS_SUCCESSFUL ) { printf( "rtems_rate_monotonic_delete failed with status of %d.\n", status ); exit( 0 ); @@ -91,7 +87,7 @@ rtems_task Task_1( { rtems_name name; name = rtems_build_name( 'P', 'E', 'R', 'A' ); - test_loop(1, name, T1_PER,T1_DUR,T1_SERVER); + test_loop(1, name, T1_PER,T1_DUR); } @@ -101,7 +97,7 @@ rtems_task Task_2( { rtems_name name; name = rtems_build_name( 'P', 'E', 'R', 'B' ); - test_loop(2, name, T2_PER,T2_DUR,T2_SERVER); + test_loop(2, name, T2_PER,T2_DUR); }