forked from Imagelibrary/rtems
tmtests/tm27: Fixes for RTEMS_DEBUG
This commit is contained in:
@@ -99,6 +99,9 @@ rtems_task Task_1(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
|
rtems_interrupt_level level;
|
||||||
|
#endif
|
||||||
Chain_Control *ready_queues;
|
Chain_Control *ready_queues;
|
||||||
|
|
||||||
Install_tm27_vector( Isr_handler );
|
Install_tm27_vector( Isr_handler );
|
||||||
@@ -180,12 +183,20 @@ rtems_task Task_1(
|
|||||||
|
|
||||||
_Thread_Dispatch_set_disable_level( 0 );
|
_Thread_Dispatch_set_disable_level( 0 );
|
||||||
|
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
|
rtems_interrupt_disable(level);
|
||||||
|
#endif
|
||||||
|
|
||||||
ready_queues = (Chain_Control *) _Scheduler.information;
|
ready_queues = (Chain_Control *) _Scheduler.information;
|
||||||
_Thread_Executing =
|
_Thread_Executing =
|
||||||
(Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
|
(Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
|
||||||
|
|
||||||
_Thread_Dispatch_necessary = 1;
|
_Thread_Dispatch_necessary = 1;
|
||||||
|
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
|
rtems_interrupt_enable(level);
|
||||||
|
#endif
|
||||||
|
|
||||||
Interrupt_occurred = 0;
|
Interrupt_occurred = 0;
|
||||||
benchmark_timer_initialize();
|
benchmark_timer_initialize();
|
||||||
Cause_tm27_intr();
|
Cause_tm27_intr();
|
||||||
@@ -210,6 +221,9 @@ rtems_task Task_2(
|
|||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
|
rtems_interrupt_level level;
|
||||||
|
#endif
|
||||||
Chain_Control *ready_queues;
|
Chain_Control *ready_queues;
|
||||||
|
|
||||||
#if (MUST_WAIT_FOR_INTERRUPT == 1)
|
#if (MUST_WAIT_FOR_INTERRUPT == 1)
|
||||||
@@ -241,12 +255,20 @@ rtems_task Task_2(
|
|||||||
|
|
||||||
_Thread_Dispatch_set_disable_level( 0 );
|
_Thread_Dispatch_set_disable_level( 0 );
|
||||||
|
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
|
rtems_interrupt_disable(level);
|
||||||
|
#endif
|
||||||
|
|
||||||
ready_queues = (Chain_Control *) _Scheduler.information;
|
ready_queues = (Chain_Control *) _Scheduler.information;
|
||||||
_Thread_Executing =
|
_Thread_Executing =
|
||||||
(Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
|
(Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
|
||||||
|
|
||||||
_Thread_Dispatch_necessary = 1;
|
_Thread_Dispatch_necessary = 1;
|
||||||
|
|
||||||
|
#if defined(RTEMS_SMP)
|
||||||
|
rtems_interrupt_enable(level);
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user