From d504e48b29e570d28257d656435541892345316c Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Fri, 1 Jul 2011 14:28:03 +0000 Subject: 2011-07-01 Jennifer Averett * support/include/tmacros.h: Disable the check for dispatch disable level for SMP tests. Another CPU may be inside RTEMS by the time these checks are being done which would result in false failures. --- testsuites/support/include/tmacros.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'testsuites/support') diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h index 260bf685fb..9fb3c45098 100644 --- a/testsuites/support/include/tmacros.h +++ b/testsuites/support/include/tmacros.h @@ -45,8 +45,15 @@ extern "C" { /* * Check that that the dispatch disable level is proper for the * mode/state of the test. Normally it should be 0 when in task space. + * + * This test is only valid when in a non smp system. In an smp system + * another cpu may be accessing the core at any point when this core + * does not have it locked. */ -#define check_dispatch_disable_level( _expect ) \ +#if defined SMPTEST + #define check_dispatch_disable_level( _expect ) +#else + #define check_dispatch_disable_level( _expect ) \ do { \ if ( (_expect) != -1 \ && ((_Thread_Dispatch_in_critical_section() == false && (_expect) != 0) \ @@ -55,11 +62,12 @@ extern "C" { printk( \ "\n_Thread_Dispatch_disable_level is (%" PRId32 \ ") not %d detected at %s:%d\n", \ - _Thread_Dispatch_get_disable_level(), (_expect), __FILE__, __LINE__ ); \ + _Thread_Dispatch_in_critical_section(), (_expect), __FILE__, __LINE__ ); \ FLUSH_OUTPUT(); \ rtems_test_exit( 1 ); \ } \ } while ( 0 ) +#endif /* * These macros properly report errors within the Classic API -- cgit v1.2.3