[rtems commit] tmtests/tm27: Fixes for RTEMS_DEBUG
Sebastian Huber
sebh at rtems.org
Thu Aug 1 14:41:52 UTC 2013
Module: rtems
Branch: master
Commit: 09c00eea70a9d62ba84a13f891540f8387ad2d2d
Changeset: http://git.rtems.org/rtems/commit/?id=09c00eea70a9d62ba84a13f891540f8387ad2d2d
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Aug 1 13:49:15 2013 +0200
tmtests/tm27: Fixes for RTEMS_DEBUG
---
testsuites/tmtests/tm27/task1.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/testsuites/tmtests/tm27/task1.c b/testsuites/tmtests/tm27/task1.c
index cdb81a4..fac889c 100644
--- a/testsuites/tmtests/tm27/task1.c
+++ b/testsuites/tmtests/tm27/task1.c
@@ -99,6 +99,9 @@ rtems_task Task_1(
rtems_task_argument argument
)
{
+#if defined(RTEMS_SMP)
+ rtems_interrupt_level level;
+#endif
Chain_Control *ready_queues;
Install_tm27_vector( Isr_handler );
@@ -180,12 +183,20 @@ rtems_task Task_1(
_Thread_Dispatch_set_disable_level( 0 );
+#if defined(RTEMS_SMP)
+ rtems_interrupt_disable(level);
+#endif
+
ready_queues = (Chain_Control *) _Scheduler.information;
_Thread_Executing =
(Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
_Thread_Dispatch_necessary = 1;
+#if defined(RTEMS_SMP)
+ rtems_interrupt_enable(level);
+#endif
+
Interrupt_occurred = 0;
benchmark_timer_initialize();
Cause_tm27_intr();
@@ -210,6 +221,9 @@ rtems_task Task_2(
rtems_task_argument argument
)
{
+#if defined(RTEMS_SMP)
+ rtems_interrupt_level level;
+#endif
Chain_Control *ready_queues;
#if (MUST_WAIT_FOR_INTERRUPT == 1)
@@ -241,12 +255,20 @@ rtems_task Task_2(
_Thread_Dispatch_set_disable_level( 0 );
+#if defined(RTEMS_SMP)
+ rtems_interrupt_disable(level);
+#endif
+
ready_queues = (Chain_Control *) _Scheduler.information;
_Thread_Executing =
(Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
_Thread_Dispatch_necessary = 1;
+#if defined(RTEMS_SMP)
+ rtems_interrupt_enable(level);
+#endif
+
_Thread_Dispatch();
}
More information about the vc
mailing list