Sorry for the reposting but I made I gross mistake in my previous
message, forget it.
I used rt_mask in place of rt_unmask, so it should read:
daniel sheltraw wrote:
>
> RTAI/RTL gurus
>
> Let me clarify or make more specific what I am trying to do. A suspend
> or resume may not be the way to go and I would appreciate suggestions.
>
> I have setup an ISR that accepts hardware interrupts from another
> device via the parallel port. The ISR simply increments a counter. I would
> like to produce a pause in the task when the counter reaches a certain value
> and restart the task at another counter value. This
> should be done without a busy wait checking the value of the counter.
>
> Any clarifications on using suspend/resume routines to control the task
> within an ISR. Any other suggestions? Semaphores were
> suggested. Does anyone have a code snippet for a semaphore approach?
>
It is not clear if you are addressing RTL or RTAI, this replay is just
for the case you are referring to the latter:
- in you real time task simply do rt_task_suspend(&task),
- in IRQ the handler, after you have done every thing else:
- rt_unmask(irq) // needed only for SMP level
interrupts // no need for it under
UP
- hard_sti();
- rt_task_resume(&task)
In the RTAI distribution there are two examples showing exactly that.
Ciao, Paolo.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/