summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sp37
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-23 16:15:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-30 11:16:28 +0200
commitbf30999cc697325eda3afd1833b78a7e64255fc4 (patch)
treebc365daf0a3c0e6fe7c72cfe33c7603f7da54351 /testsuites/sptests/sp37
parentsapi: SMP support for chains (diff)
downloadrtems-bf30999cc697325eda3afd1833b78a7e64255fc4.tar.bz2
smp: Add and use _Assert_Owner_of_giant()
Add and use _ISR_Disable_without_giant() and _ISR_Enable_without_giant() if RTEMS_SMP is defined. On single processor systems the ISR disable/enable was the big hammer which ensured system-wide mutual exclusion. On SMP configurations this no longer works since other processors do not care about disabled interrupts on this processor and continue to execute freely. On SMP in addition to ISR disable/enable an SMP lock must be used. Currently we have only the Giant lock so we can check easily that ISR disable/enable is used only in the right context.
Diffstat (limited to 'testsuites/sptests/sp37')
-rw-r--r--testsuites/sptests/sp37/init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/sptests/sp37/init.c b/testsuites/sptests/sp37/init.c
index efb92b82a2..b6ab157589 100644
--- a/testsuites/sptests/sp37/init.c
+++ b/testsuites/sptests/sp37/init.c
@@ -229,13 +229,19 @@ void test_interrupt_inline(void)
}
puts( "interrupt disable (use inline)" );
+ _Thread_Disable_dispatch();
rtems_interrupt_disable( level );
+ _Thread_Enable_dispatch();
puts( "interrupt flash (use inline)" );
+ _Thread_Disable_dispatch();
rtems_interrupt_flash( level );
+ _Thread_Enable_dispatch();
puts( "interrupt enable (use inline)" );
+ _Thread_Disable_dispatch();
rtems_interrupt_enable( level );
+ _Thread_Enable_dispatch();
puts( "interrupt level mode (use inline)" );
level_mode_body = rtems_interrupt_level_body( level );
@@ -463,16 +469,24 @@ rtems_task Init(
}
puts( "interrupt disable (use body)" );
+ _Thread_Disable_dispatch();
level = rtems_interrupt_disable();
+ _Thread_Enable_dispatch();
puts( "interrupt disable (use body)" );
+ _Thread_Disable_dispatch();
level = rtems_interrupt_disable();
+ _Thread_Enable_dispatch();
puts( "interrupt flash (use body)" );
+ _Thread_Disable_dispatch();
rtems_interrupt_flash( level );
+ _Thread_Enable_dispatch();
puts( "interrupt enable (use body)" );
+ _Thread_Disable_dispatch();
rtems_interrupt_enable( level );
+ _Thread_Enable_dispatch();
puts( "interrupt level mode (use body)" );
level_mode_body = rtems_interrupt_level_body( level );