eric keller wrote:
> 
> I would like to point out that an interrupt based approach, where the most
> important
> stuff happens in the ISR is a perfectly viable approach.  If a task _must_ get
> done
> before the next interrupt, then you may as well do it in the ISR.  I cannot see
> any
> advantage in scheduling a thread to clean up after an ISR each time the ISR
> runs,
> unless that cleanup is not as critical as the interrupt.
> 
> In my case i want my controller to run in an ISR, which means that I'm going to
> use
> fp in my ISR.  I really don't see anything wrong with that on the processors i
> am
> using.  If it becomes a problem with future processors, maybe i'll have to
> switch
> to a DSP or other processor where the fpu is not cobbled on like it is on the
> i386.
> 
> I think the idea that you shouldn't use fp in kernal mode makes a lot of sense
> for
> linux and no sense at all for a RTOS.
> eric
> 

Hi Erik,

I agree with your points.  Each design may have different constraints
and so sometimes you may wish to do FP in an ISR.  Nothing should be
forbidden if one has sound reasons for making a particular design
choice.

One point I want to make is that there is a good reason why often people
would choose to have an ISR wake up a real-time task to carry out the
bulk of a set of processing.  On most other real-time operating systems,
the task that gets woken from the ISR runs at a lower privilege level
than an ISR (in terms of machine state), also interrupts are normally
enabled.  This means that the task can be pre-empted by other real-time
tasks and also interrupted.  In the Linux (hard) real-time
implementations (RTL/RTAI) this is not currently true, as I believe that
the task/thread runs at the same machine privilege level as the ISR.  So
for real-time Linux it is currently less important than on other RTOS's
to make the ISR/task distinction, but things may change in the future,
so keeping this in mind may help to produce a design that will be more
conventional:

        a) if real-time Linux changes
        b) if you port to other real-time operating systems


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/

Reply via email to