diff options
Diffstat (limited to 'cpukit/score/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/threadimpl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index 8b91730d34..7e6681bb75 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -26,6 +26,7 @@ #include <rtems/score/interr.h> #include <rtems/score/isr.h> #include <rtems/score/objectimpl.h> +#include <rtems/score/resourceimpl.h> #include <rtems/score/statesimpl.h> #include <rtems/score/sysstate.h> #include <rtems/score/todimpl.h> @@ -791,6 +792,10 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_life_changing( * Resources are accounted with the Thread_Control::resource_count resource * counter. This counter is used by semaphore objects for example. * + * In addition to the resource counter there is a resource dependency tree + * available on SMP configurations. In case this tree is non-empty, then the + * thread owns resources. + * * @param[in] the_thread The thread. */ RTEMS_INLINE_ROUTINE bool _Thread_Owns_resources( @@ -799,6 +804,11 @@ RTEMS_INLINE_ROUTINE bool _Thread_Owns_resources( { bool owns_resources = the_thread->resource_count != 0; +#if defined(RTEMS_SMP) + owns_resources = owns_resources + || _Resource_Node_owns_resources( &the_thread->Resource_node ); +#endif + return owns_resources; } |