summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/taskmode.c
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 /cpukit/rtems/src/taskmode.c
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 'cpukit/rtems/src/taskmode.c')
-rw-r--r--cpukit/rtems/src/taskmode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c
index 606366b25f..8650ccc250 100644
--- a/cpukit/rtems/src/taskmode.c
+++ b/cpukit/rtems/src/taskmode.c
@@ -39,7 +39,7 @@ static void _RTEMS_Tasks_Dispatch_if_necessary(
#if defined( RTEMS_SMP )
ISR_Level level;
- _ISR_Disable( level );
+ _ISR_Disable_without_giant( level );
#endif
if ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) {
@@ -48,7 +48,7 @@ static void _RTEMS_Tasks_Dispatch_if_necessary(
}
#if defined( RTEMS_SMP )
- _ISR_Enable( level );
+ _ISR_Enable_without_giant( level );
#endif
if ( dispatch_necessary ) {