From 0dd49d001515897cceb9195eb97dfac683552a0b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 31 Oct 2016 16:10:32 +0100 Subject: score: Introduce thread resource count methods This makes it easier to conditionally enable/disable the thread resource count usage. --- cpukit/score/include/rtems/score/threadimpl.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cpukit/score/include/rtems/score/threadimpl.h') diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h index c7eef97254..37127fbabd 100644 --- a/cpukit/score/include/rtems/score/threadimpl.h +++ b/cpukit/score/include/rtems/score/threadimpl.h @@ -973,6 +973,20 @@ RTEMS_INLINE_ROUTINE bool _Thread_Is_joinable( return ( the_thread->Life.state & THREAD_LIFE_DETACHED ) == 0; } +RTEMS_INLINE_ROUTINE void _Thread_Resource_count_increment( + Thread_Control *the_thread +) +{ + ++the_thread->resource_count; +} + +RTEMS_INLINE_ROUTINE void _Thread_Resource_count_decrement( + Thread_Control *the_thread +) +{ + --the_thread->resource_count; +} + /** * @brief Returns true if the thread owns resources, and false otherwise. * -- cgit v1.2.3