[PATCH] score: PR2136: Fix _Thread_Change_priority()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Aug 9 05:54:52 UTC 2013
On 2013-08-08 22:00, Chris Johns wrote:
> 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
_Thread_Is_executing( the_thread) || _Thread_Is_heir( the_thread )
is not equal to
_Thread_Is_executing_also_the_heir( void )
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list