2008-10-13 Joel Sherrill <joel.sherrill@oarcorp.com>

* clock_driver_simidle.c: Ensure ISR nest level and Thread Dispatch
	disable level are in the same state they would be in a true ISR. This
	ensures that all of the clock tick handling is as similar as possible
	in this limited environment.
This commit is contained in:
Joel Sherrill
2008-10-13 17:06:33 +00:00
parent 06c3530efc
commit 08467405b0
2 changed files with 16 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
2008-10-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* clock_driver_simidle.c: Ensure ISR nest level and Thread Dispatch
disable level are in the same state they would be in a true ISR. This
ensures that all of the clock tick handling is as similar as possible
in this limited environment.
2008-10-02 Joel Sherrill <joel.sherrill@OARcorp.com> 2008-10-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* include/tm27.h: Use shared tm27.h stub. * include/tm27.h: Use shared tm27.h stub.

View File

@@ -7,7 +7,9 @@
* $Id$ * $Id$
*/ */
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
#include <rtems.h> #include <rtems.h>
#include <rtems/score/thread.h>
#define CLOCK_VECTOR 0 #define CLOCK_VECTOR 0
@@ -40,8 +42,13 @@ Thread clock_driver_sim_idle_body(
) )
{ {
for( ; ; ) { for( ; ; ) {
if ( clock_driver_enabled ) if ( clock_driver_enabled ) {
rtems_clock_tick(); _Thread_Disable_dispatch();
_ISR_Nest_level++;
rtems_clock_tick();
_ISR_Nest_level--;
_Thread_Enable_dispatch();
}
} }
return 0; /* to avoid warning */ return 0; /* to avoid warning */
} }