rtems_task Task_1( rtems_task_argument argument ) { Install_tm27_vector( Isr_handler ) ; Interrupt_nest = 0; /* Benchmark code */ benchmark_timer_initialize(); /* goes to Isr_handler */ Cause_tm27_intr(); put_time( "Rhealstone: Interrupt Latency", Interrupt_enter_time, 1, /* Only Rhealstone that isn't an average */ timer_overhead, 0 ); TEST_END(); rtems_test_exit( 0 ); }
rtems_task Task_1( rtems_task_argument argument ) { Install_tm27_vector( Isr_handler ) ; Interrupt_nest = 0; _Thread_Dispatch_set_disable_level( 0 ); /* Benchmark code */ benchmark_timer_initialize(); /* goes to Isr_handler */ Cause_tm27_intr(); put_time( "Rhealstone: Interrupt Latency", Interrupt_enter_time, 1, /* Only Rhealstone that isn't an average */ timer_overhead, 0 ); puts( "*** END OF RHILATENCY ***" ); rtems_test_exit( 0 ); }
rtems_task Task_1( rtems_task_argument argument ) { Scheduler_priority_Context *scheduler_context = _Scheduler_priority_Get_context( _Scheduler_Get( _Thread_Get_executing() ) ); #if defined(RTEMS_SMP) rtems_interrupt_level level; #endif Install_tm27_vector( Isr_handler ); /* * No preempt .. no nesting */ Interrupt_nest = 0; Interrupt_occurred = 0; benchmark_timer_initialize(); Cause_tm27_intr(); /* goes to Isr_handler */ #if (MUST_WAIT_FOR_INTERRUPT == 1) while ( Interrupt_occurred == 0 ); #endif Interrupt_return_time = benchmark_timer_read(); put_time( "rtems interrupt: entry overhead returns to interrupted task", Interrupt_enter_time, 1, 0, timer_overhead ); put_time( "rtems interrupt: exit overhead returns to interrupted task", Interrupt_return_time, 1, 0, timer_overhead ); /* * No preempt .. nested */ _Thread_Disable_dispatch(); Interrupt_nest = 1; Interrupt_occurred = 0; benchmark_timer_initialize(); Cause_tm27_intr(); /* goes to Isr_handler */ #if (MUST_WAIT_FOR_INTERRUPT == 1) while ( Interrupt_occurred == 0 ); #endif Interrupt_return_time = benchmark_timer_read(); _Thread_Unnest_dispatch(); put_time( "rtems interrupt: entry overhead returns to nested interrupt", Interrupt_enter_nested_time, 1, 0, 0 ); put_time( "rtems interrupt: exit overhead returns to nested interrupt", Interrupt_return_nested_time, 1, 0, 0 ); /* * Does a preempt .. not nested */ #if defined(RTEMS_SMP) _ISR_Disable_without_giant(level); #endif _Thread_Executing = (Thread_Control *) _Chain_First(&scheduler_context->Ready[LOW_PRIORITY]); _Thread_Dispatch_necessary = 1; #if defined(RTEMS_SMP) _ISR_Enable_without_giant(level); #endif Interrupt_occurred = 0; benchmark_timer_initialize(); Cause_tm27_intr(); /* * goes to Isr_handler and then returns */ TEST_END(); rtems_test_exit( 0 ); }
rtems_task Task_1( rtems_task_argument argument ) { Chain_Control *ready_queues; Install_tm27_vector( Isr_handler ); /* * No preempt .. no nesting */ Interrupt_nest = 0; _Thread_Dispatch_set_disable_level( 0 ); Interrupt_occurred = 0; benchmark_timer_initialize(); Cause_tm27_intr(); /* goes to Isr_handler */ #if (MUST_WAIT_FOR_INTERRUPT == 1) while ( Interrupt_occurred == 0 ); #endif Interrupt_return_time = benchmark_timer_read(); put_time( "interrupt entry overhead: returns to interrupted task", Interrupt_enter_time, 1, 0, timer_overhead ); put_time( "interrupt exit overhead: returns to interrupted task", Interrupt_return_time, 1, 0, timer_overhead ); /* * No preempt .. nested */ _Thread_Dispatch_set_disable_level( 1 ); Interrupt_nest = 1; Interrupt_occurred = 0; benchmark_timer_initialize(); Cause_tm27_intr(); /* goes to Isr_handler */ #if (MUST_WAIT_FOR_INTERRUPT == 1) while ( Interrupt_occurred == 0 ); #endif Interrupt_return_time = benchmark_timer_read(); _Thread_Dispatch_set_disable_level( 0 ); put_time( "interrupt entry overhead: returns to nested interrupt", Interrupt_enter_nested_time, 1, 0, 0 ); put_time( "interrupt exit overhead: returns to nested interrupt", Interrupt_return_nested_time, 1, 0, 0 ); /* * Does a preempt .. not nested */ _Thread_Dispatch_set_disable_level( 0 ); ready_queues = (Chain_Control *) _Scheduler.information; _Thread_Executing = (Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]); _Thread_Dispatch_necessary = 1; Interrupt_occurred = 0; benchmark_timer_initialize(); Cause_tm27_intr(); /* * goes to Isr_handler and then returns */ puts( "*** END OF TEST 27 ***" ); rtems_test_exit( 0 ); }
rtems_task Task_1( rtems_task_argument argument ) { Install_tm27_vector( Isr_handler ); /* * No preempt .. no nesting */ Interrupt_nest = 0; _Thread_Dispatch_disable_level = 0; Interrupt_occurred = 0; Timer_initialize(); Cause_tm27_intr(); /* goes to Isr_handler */ #if (MUST_WAIT_FOR_INTERRUPT == 1) while ( Interrupt_occurred == 0 ); #endif Interrupt_return_time = Timer_read(); put_time( "interrupt entry overhead: returns to interrupted task", Interrupt_enter_time, 1, 0, timer_overhead ); put_time( "interrupt exit overhead: returns to interrupted task", Interrupt_return_time, 1, 0, timer_overhead ); /* * No preempt .. nested */ _Thread_Dispatch_disable_level = 1; Interrupt_nest = 1; Interrupt_occurred = 0; Timer_initialize(); Cause_tm27_intr(); /* goes to Isr_handler */ #if (MUST_WAIT_FOR_INTERRUPT == 1) while ( Interrupt_occurred == 0 ); #endif Interrupt_return_time = Timer_read(); _Thread_Dispatch_disable_level = 0; put_time( "interrupt entry overhead: returns to nested interrupt", Interrupt_enter_nested_time, 1, 0, 0 ); put_time( "interrupt exit overhead: returns to nested interrupt", Interrupt_return_nested_time, 1, 0, 0 ); /* * Does a preempt .. not nested */ _Thread_Dispatch_disable_level = 0; _Thread_Heir = (rtems_tcb *) _Thread_Ready_chain[254].last; _Context_Switch_necessary = 1; Interrupt_occurred = 0; Timer_initialize(); Cause_tm27_intr(); /* * goes to Isr_handler and then returns */ puts( "*** END OF TEST 27 ***" ); rtems_test_exit( 0 ); }