diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-04-20 15:47:32 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-04-20 15:47:32 +0000 |
commit | c8633f1fdaf60d1c6e70ac25568128a112a6d205 (patch) | |
tree | 30d726e1db6e3d177f924b734c86bc4c02231c91 /testsuites | |
parent | Regenerate. (diff) | |
download | rtems-c8633f1fdaf60d1c6e70ac25568128a112a6d205.tar.bz2 |
2009-04-20 Santosh G Vattam <vattam.santosh@gmail.com>
* sp37/init.c, sp37/sp37.scn: Add test case for
rtems_interrupt_level_attribute body.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/sptests/sp37/init.c | 16 | ||||
-rw-r--r-- | testsuites/sptests/sp37/sp37.scn | 4 |
3 files changed, 25 insertions, 0 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index b119e63129..33c905e702 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,3 +1,8 @@ +2009-04-20 Santosh G Vattam <vattam.santosh@gmail.com> + + * sp37/init.c, sp37/sp37.scn: Add test case for + rtems_interrupt_level_attribute body. + 2009-04-03 Ralf Corsépius <ralf.corsepius@rtems.org> * sp01/Makefile.am, sp02/Makefile.am, sp03/Makefile.am, diff --git a/testsuites/sptests/sp37/init.c b/testsuites/sptests/sp37/init.c index 6480410272..e016e364b3 100644 --- a/testsuites/sptests/sp37/init.c +++ b/testsuites/sptests/sp37/init.c @@ -19,6 +19,7 @@ void test_interrupt_inline(void) { rtems_interrupt_level level; + rtems_attribute level_attribute, level_attribute_macro; bool in_isr; puts( "interrupt is in progress (use body)" ); @@ -36,6 +37,13 @@ void test_interrupt_inline(void) puts( "interrupt enable (use inline)" ); rtems_interrupt_enable( level ); + + puts( "interrupt level attribute (use inline)" ); + level_attribute = rtems_interrupt_level_attribute( level ); + level_attribute_macro = RTEMS_INTERRUPT_LEVEL(level); + if ( level_attribute_macro == level_attribute ) { + puts( "test case working.." ); + } } volatile int isr_in_progress_body; @@ -147,6 +155,7 @@ rtems_task Init( rtems_time_of_day time; rtems_status_code status; rtems_interrupt_level level; + rtems_attribute level_attribute,level_attribute_macro; bool in_isr; rtems_id timer; int i; @@ -250,6 +259,13 @@ rtems_task Init( puts( "interrupt enable (use body)" ); rtems_interrupt_enable( level ); + + puts( "interrupt level attribute (use body)" ); + level_attribute = rtems_interrupt_level_attribute( level ); + level_attribute_macro = RTEMS_INTERRUPT_LEVEL(level); + if ( level_attribute_macro == level_attribute ) { + puts("test seems to work"); + } /* * Test ISR in progress from actual ISR diff --git a/testsuites/sptests/sp37/sp37.scn b/testsuites/sptests/sp37/sp37.scn index 8eb38323fe..adfa9eedd4 100644 --- a/testsuites/sptests/sp37/sp37.scn +++ b/testsuites/sptests/sp37/sp37.scn @@ -6,11 +6,15 @@ interrupt is in progress (use body) interrupt disable (use inline) interrupt flash (use inline) interrupt enable (use inline) +interrupt level attribute (use inline) +test case working.. interrupt is in progress (use body) interrupt disable (use body) interrupt disable (use body) interrupt flash (use body) interrupt enable (use body) +interrupt level attribute (use body) +test seems to work isr_in_progress(inline) from ISR -- OK isr_in_progress(body) from ISR -- OK *** END OF TEST 37 *** |