Robert Kavaler ([EMAIL PROTECTED]) wrote:
> and realtime tasks?
> 
> Will the interrupt preempt the current RT task or will the interrupt be
> queued until the current task completes?  I don't see any way to set a
> priority to the interrupt which leads me to think that the interrupt
> will just preempt the current task.

Yes.
 
> When an interrupt runs can it be preempted by the RT scheduler? (after
> all, it is just another interrupt).

No, RT interrupt handlers are non-preemptable.
> 
> Do I have to size each task's stack to handle the maximum interrupt
> memory usage (i.e. all interrupts going off at the same time)?

Yes, but you don't need more than 8192 bytes, since that's the Linux kernel
stack size.

> If the interrupt does preempt, is there some easy way to implement
> queueing where the interrupt "task" can be scheduled with normal task
> priorities (i.e. create a normal task and have the interrupt wake task)?

In the real-time task, use the following loop:

while (1) {
        pthread_suspend_np(pthread_self()); 
                // handle the interrupt
}

Then install a RT interrupt handler using rtl_request_irq (there is a manual
page in the distribution).
In the interrupt handler call pthread_wakeup_np(thread) to
wake the real-time thread up.

Michael.

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

Reply via email to