Hi Gabor,
[EMAIL PROTECTED] wrote:
>
> > a *hardware* priority, this is unrelated to the concept of the priority
> > of threads. Usually, when an interrupt occurs, it interrrupts whatever
> > is running provided that a) interrupts are enabled, b) if currently in
> > an ISR, the hardware priority of the new interrupt is higher than the
> > current interrupt priority (implementation is architecture dependant).
>
> This is your wish or the reality? ;-)
I think there is a miscommunication here. If you mean the 'current' as
in Linux terms (e.g current->pid) then yes of course that may refer to a
low priory (Linux) task/process.
What I say above *is* reality, but I'm not referring to Linux in
particular. I'm trying to point out that generally there is a marked
difference in context between a true interrupt handler, and that which
it interrupts (provided it is not already in an ISR).
>
> We were speaking so far, that ISRs run long because threads awaken
> by them grabs the CPU.
I think I understand ? What was being said is that if you are in an
hard interrupt handler, and you use pthread_wakeup_np (or similar in
RTAI) to call the scheduler, the new RT thread runs before you exit the
ISR.
Victor was saying that depending an what you call, you can change the
behavior to let the ISR finish and then have the RT task/thread run
(pthread_mutex_unlock), this may be what you need.
>
> Now I have such an ISR. There can be occur such a situation,
> that it runs in two instances because the first one is delayed
> by a high priority thread, meanwhile the hardware IRQ is delivered
> again.
You need to make sure that the thread is outside ISR context (I think
?). Fundamentally you need to make sure that you have time to complete
the thread work before the next re-run request occurs (is that correct
?, I'm guessing you want to avoid reentrancy)
Regards, Stuart
-- [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/