2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.com

PR 1777/cpukit
	* support/include/tmacros.h, tmtests/tm26/task1.c,
	tmtests/tm27/task1.c: Consolidated access to
	_Thread_Dispatch_disable_level.
This commit is contained in:
Jennifer Averett
2011-04-21 19:05:34 +00:00
parent d7c388321a
commit 1c95d94af6
4 changed files with 18 additions and 9 deletions
+7
View File
@@ -1,3 +1,10 @@
2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.com
PR 1777/cpukit
* support/include/tmacros.h, tmtests/tm26/task1.c,
tmtests/tm27/task1.c: Consolidated access to
_Thread_Dispatch_disable_level.
2011-04-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Add fstests.
+4 -3
View File
@@ -25,6 +25,7 @@
#include <string.h>
#include <rtems/error.h>
#include <rtems/score/thread.h> /* _Thread_Dispatch_disable_level */
#include <rtems/score/thread.inl> /* _Thread_Dispatch_disable_level */
#ifdef __cplusplus
extern "C" {
@@ -48,13 +49,13 @@ extern "C" {
#define check_dispatch_disable_level( _expect ) \
do { \
if ( (_expect) != -1 \
&& ((_Thread_Dispatch_disable_level == 0 && (_expect) != 0) \
|| (_Thread_Dispatch_disable_level != 0 && (_expect) == 0)) \
&& ((_Thread_Dispatch_in_critical_section() == false && (_expect) != 0) \
|| (_Thread_Dispatch_in_critical_section() && (_expect) == 0)) \
) { \
printk( \
"\n_Thread_Dispatch_disable_level is (%" PRId32 \
") not %d detected at %s:%d\n", \
_Thread_Dispatch_disable_level, (_expect), __FILE__, __LINE__ ); \
_Thread_Dispatch_get_disable_level(), (_expect), __FILE__, __LINE__ ); \
FLUSH_OUTPUT(); \
rtems_test_exit( 1 ); \
} \
+2 -1
View File
@@ -453,7 +453,8 @@ void complete_test( void )
_Thread_Heir = _Thread_Executing;
_Thread_Dispatch_necessary = false;
_Thread_Dispatch_disable_level = 0;
_Thread_Dispatch_set_disable_level( 0 );
/*
* Now dump all the times
+5 -5
View File
@@ -111,7 +111,7 @@ rtems_task Task_1(
Interrupt_nest = 0;
_Thread_Dispatch_disable_level = 0;
_Thread_Dispatch_set_disable_level( 0 );
Interrupt_occurred = 0;
@@ -144,7 +144,7 @@ rtems_task Task_1(
* No preempt .. nested
*/
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_set_disable_level( 1 );
Interrupt_nest = 1;
@@ -158,7 +158,7 @@ rtems_task Task_1(
#endif
Interrupt_return_time = benchmark_timer_read();
_Thread_Dispatch_disable_level = 0;
_Thread_Dispatch_set_disable_level( 0 );
put_time(
"interrupt entry overhead: returns to nested interrupt",
@@ -180,7 +180,7 @@ rtems_task Task_1(
* Does a preempt .. not nested
*/
_Thread_Dispatch_disable_level = 0;
_Thread_Dispatch_set_disable_level( 0 );
ready_queues = (Chain_Control *) _Scheduler.information;
_Thread_Executing =
@@ -241,7 +241,7 @@ rtems_task Task_2(
* Switch back to the other task to exit the test.
*/
_Thread_Dispatch_disable_level = 0;
_Thread_Dispatch_set_disable_level( 0 );
ready_queues = (Chain_Control *) _Scheduler.information;
_Thread_Executing =