diff options
Diffstat (limited to 'testsuites/support')
-rw-r--r-- | testsuites/support/include/tmacros.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuites/support/include/tmacros.h b/testsuites/support/include/tmacros.h index 010296b7cf..260bf685fb 100644 --- a/testsuites/support/include/tmacros.h +++ b/testsuites/support/include/tmacros.h @@ -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 ); \ } \ |