device driver development on real time systems

Joel Sherrill joel.sherrill at OARcorp.com
Tue Mar 25 14:09:53 UTC 2003



gregory.menke at gsfc.nasa.gov wrote:
> 
> Seamus Hegarty writes:
>  > Hi All,
>  >
>  > I presume a device driver which is being developed
>  > for a real-time system,
>  > must obey a series of real-time based rules and
>  > policies,
>  > which are not so important on non-real-time systems.
>  >
>  > is there any documentation which lists these
>  > policies
>  > and rules which must be satisfied by a device
>  > driver,
>  > so that its operation fall into a deterministic
>  > model,
>  > hence real-time compatible?
>  >
> 
> I don't know of a document, but I attempt to be aware of these
> suggestions;
> 
> - make it fast
> - don't screw it up
> 
> ;)

That's it in a nutshell. :)

The most critical thing to do is not block in an ISR.  That will destory
the system.  But the general rule for device drivers is to do exactly
what has to be done -- no more and no less.  Minimimze processing
in ISRs.  If you have to disable interrupts or preemption, make it brief
and restore the state when you return.

> 
> Gregm

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list