questions about _Thread_queue_Enqueue_critical error path

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jun 9 13:17:33 UTC 2016


On 08/06/16 19:32, Gedare Bloom wrote:
> In threadqenqueue.c:101 the error path will remove the timer and
> unblock the thread.
>
> 1) The condition for this error is that the wait flags did not match
> the expected value. This means some other change occurred in the
> thread wait status.  I don't even know if this is possible, but if it
> does happen, why is it that unconditionally removing the Thread_Timer
> and unblocking the thread is the right thing to do?

See:

https://lists.rtems.org/pipermail/devel/2016-June/015251.html

>
> 2) Should this cleanup path only remove the timer if it was scheduled
> i.e. if timeout != WATCHDOG_NO_TIMEOUT?

This path is unlikely, thus not performance critical. So, I think its 
better to avoid additional logic.

-- 
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