Does rtems have a portable, sort-of calibrated time-wasting loop?

Till Straumann strauman at slac.stanford.edu
Wed Mar 26 17:52:22 UTC 2003


gregory.menke at gsfc.nasa.gov wrote:

>Perhaps something like Linux's udelay- it doesn't have to be fast, but
>should cause the program to spin for the supplied interval.  It should
>not itself reschedule, so rtems_wake_after is out- and should be
>callable from an isr.
>
>Thanks,
>
>Gregm
>

What is this? You should _never_ kill time (or do anything else you 
could do from
a task context) in an ISR. Please don't tamper with RTEMS' real-time 
performance.

AFAIK, you intend to use this in a ethernet driver. Please consider that 
porting a
linux driver usually involves a little more work than just tweaking the APIs
(sbuf->mbuf, IRQ and PCI APIs, etc.). Typically, you want to strip down 
the ISR
so it wakes up a task which does all the real work (including 'waiting').
This ensures that a properly prioritized real-time thread can do its job 
even when
extensive networking is going on.

-- Till




More information about the users mailing list