diff options
Diffstat (limited to 'cpukit/score/src/debugisownerofallocator.c')
-rw-r--r-- | cpukit/score/src/debugisownerofallocator.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/cpukit/score/src/debugisownerofallocator.c b/cpukit/score/src/debugisownerofallocator.c index 7879902025..57da2ca001 100644 --- a/cpukit/score/src/debugisownerofallocator.c +++ b/cpukit/score/src/debugisownerofallocator.c @@ -18,8 +18,7 @@ #include <rtems/score/assert.h> #include <rtems/score/apimutex.h> -#include <rtems/score/thread.h> -#include <rtems/score/threaddispatch.h> +#include <rtems/score/threadimpl.h> #if defined( RTEMS_DEBUG ) bool _Debug_Is_owner_of_allocator( void ) @@ -27,20 +26,12 @@ API_Mutex_Control *mutex = _RTEMS_Allocator_Mutex; bool owner; - /* - * We have to synchronize with the _CORE_mutex_Surrender() operation, - * otherwise we may observe an outdated mutex holder. - */ - _Thread_Disable_dispatch(); - if ( mutex != NULL ) { - owner = mutex->Mutex.holder == _Thread_Executing; + owner = mutex->Mutex.holder == _Thread_Get_executing(); } else { owner = false; } - _Thread_Enable_dispatch(); - return owner; } #endif |