Sebastian Huber wrote:
/**
- * This function returns true if the currently executing thread
- * is also the heir thread, and false otherwise.
- */
-
-RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
Why not pass the 'the_thread' to this call and keep the logic local
rather than ...
+ if ( _Thread_Is_executing( the_thread) || _Thread_Is_heir( the_thread ) )
.. and ..
+ if ( _Thread_Is_executing( the_thread) || _Thread_Is_heir( the_thread ) )
The code ...
if ( _Thread_Is_executing_also_the_heir( the_thread ) )
... clearly describes the intent rather than me needing to check the
logic of the above operation is correct in the context and not a copy
and paste error. Small mistakes in this area can be difficult to find.
Chris
_______________________________________________
rtems-devel mailing list
rtems-devel@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-devel