Page 1 of 1

How to check and abort a timer request with a soft interrupt

Posted: Mon Jul 09, 2018 7:20 am
by Hypex
I've been experimenting with soft interrupts perpetuated by a timer.device generated timer interrupt. That is working fine. My problem is, that the normal method of checking with CheckIO() an IORequest and then aborting it with AbortIO() and a WaitIO() if still busy is not working. What I am finding is that my code is hanging in the checking procedure somewhere.

Given that the IORequest is GetMsg()ed off from the interrupt instead of the usual functions means this is an isolated condition. And so obviously affects the management.

But is there a way to check and abort a timer request? I suspect that it would need to be managed in the interrupt itself since it pulls the request off the list when done. In the example code it checks for a flag and then delays until it is set. That's one way about. It could also be done by signalling from the interrupt itself, since it would pull the finished request off, and the task wouldn't be activated again till the interrupt ended so should be safe from preemption.