summaryrefslogtreecommitdiffstats
path: root/testsuites/tmtests/tm26/task1.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-19 14:57:44 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-22 08:40:26 +0200
commitcdf30f0550432648ac005e3f71814b7f708a4ce3 (patch)
tree7dc1af2af9a1de7565a9e79736166994495486a2 /testsuites/tmtests/tm26/task1.c
parenttmtests/tm27: Use scheduler lock (diff)
downloadrtems-cdf30f0550432648ac005e3f71814b7f708a4ce3.tar.bz2
rtems: Add rtems_interrupt_local_disable|enable()
Add rtems_interrupt_local_disable|enable() as suggested by Pavel Pisa to emphasize that interrupts are only disabled on the current processor. Do not define the rtems_interrupt_disable|enable|flash() macros and functions on SMP configurations since they don't ensure system wide mutual exclusion.
Diffstat (limited to 'testsuites/tmtests/tm26/task1.c')
-rw-r--r--testsuites/tmtests/tm26/task1.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/testsuites/tmtests/tm26/task1.c b/testsuites/tmtests/tm26/task1.c
index ee662184c5..5b19c3d3b6 100644
--- a/testsuites/tmtests/tm26/task1.c
+++ b/testsuites/tmtests/tm26/task1.c
@@ -341,15 +341,20 @@ rtems_task High_task(
_Thread_Disable_dispatch();
benchmark_timer_initialize();
- rtems_interrupt_disable( level );
+ rtems_interrupt_local_disable( level );
isr_disable_time = benchmark_timer_read();
benchmark_timer_initialize();
+#if defined(RTEMS_SMP)
+ rtems_interrupt_local_enable( level );
+ rtems_interrupt_local_disable( level );
+#else
rtems_interrupt_flash( level );
+#endif
isr_flash_time = benchmark_timer_read();
benchmark_timer_initialize();
- rtems_interrupt_enable( level );
+ rtems_interrupt_local_enable( level );
isr_enable_time = benchmark_timer_read();
_Thread_Enable_dispatch();