Re: protected type interrupts



REH a écrit :
Jean-Pierre Rosen wrote:
Thanks for the reference. Is your work-around valid? Isn't calling
Relay_Object.Isr a potentially blocking operation, and thus a bad thing
to do in an interrupt?
No, calling a protected *procedure* is not potentially-blocking (unlike calling a protected *entry*). If your compiler has ceiling_locking by defauly you may have to adjust the priority, though.

Another work-around suggested to me was to move the processing logic
out of the entry and into the task, and just use the entry for the
triggerring. What do you think about this?
Nothing, since I don't know what was a problem with your original design. As far as I understand, it's the mere fact of calling an entry of a protected object that serves as interrupt handler, with a priority in Interrupt_Priority range. So I don't think that moving the logic would change anything, as long as you still call the entry;

--
---------------------------------------------------------
J-P. Rosen (rosen@xxxxxxxxx)
Visit Adalog's web site at http://www.adalog.fr
.



Relevant Pages