Sat, 08 Jul 2000 [EMAIL PROTECTED] wrote:
[...]
> In fact, this can even be made transparent to the ISR writer by
> wrapping the ISRs -- I know you don't like extensions to POSIX, but
> we are making irq handler installaction go via sigaction and you could
> do something in the sigaction field to force an rtl_schedule on return.
>
> So my current thought is that unless there is a flaw in this reasoning
> we are ok with a little improved documentation and perhaps a wrapper
> accessible via sigaction.
Sounds like a nice way of doing it from the RTL perspective, but how does it
translate to POSIX threads in user space? Not that it would make much of a
difference in actual timing when testing code [with RTL class timing
requirements] in user space... Just to be correct.
As to forcing an rtl_schedule() upon return from the signal handler/"wrapped
ISR"; how much overhead is there involved in case the signal handler didn't do
anything that requires an rtl_schedule() call? (Compared to doing it the "real"
way; explicitly forcing the reschedule from the ISR when it's actually
required, that is.) That's where rtl_needs_resched gets in, somewhat like
normal Linux?
> And finally, we could do what you suggest, but this makes more arch
> dependent and kind of wierd code when I try to see how to do it.
> rtl_after_iret_signal:
> crawl up stack
> find iret return address
> copy it to some safe place ; /*watchout for recursion!*/
> make it point to rtl_do_after_iret_Signal
> return
>
> rtl_do_after_iret_signal
> pretend we are in a thread signal handler
> call rtl_schedule
> rebuild our stack
> iret again.
Whoa! That reminds a whole lot of hooking IRQs directly from the vectors on
the Amiga, bypassing the system for faster response; only a bit worse. :-) (The
problem with that one was uninstalling those handlers, if you put more than one
on the same vector... They couldn't know about each other!)
David Olofson
Programmer
Reologica Instruments AB
[EMAIL PROTECTED]
..- M u C o S --------------------------------. .- David Olofson ------.
| A Free/Open Multimedia | | Audio Hacker |
| Plugin and Integration Standard | | Linux Advocate |
`------------> http://www.linuxdj.com/mucos -' | Open Source Advocate |
..- A u d i a l i t y ------------------------. | Singer |
| Rock Solid Low Latency Signal Processing | | Songwriter |
`---> http://www.angelfire.com/or/audiality -' `-> [EMAIL PROTECTED] -'
-- [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/