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

Till Straumann strauman at
Wed Mar 26 17:52:22 UTC 2003

gregory.menke at 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.

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 

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