This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Making driver interruptable


On Mon, Aug 23, 2004 at 04:28:23PM +0000, Samie Hassan Ghauri wrote:
> Are the device drivers any different from any functions called by a thread 
> currently running? I mean, eg. a thread calls I/O API cyg_io_write() which 
> in turn passes the control to device driver routines. If now another thread 
> with higher priority becomes runnable, will the execution of driver 
> routines be halted to let the higher priority thread run?
> 
> In this regard, I see the driver no different from any other functions 
> called by the thread. Any comments???

Drivers are split into 3 parts: ISR a DSR and normal thread code.  The
ISR and DSR will run with higher priority than any thread. The thread
code will run with the priority of the thread calling it. Some parts
may disable the schedular to stopping high priority threads running,
but this is kept to a minimum. eCos is an RTOS, so tries to run as
much as possible in threads which can be preempted so keeping latency
for high priority threads low. eg the whole TCP/IP stack runs in a
thread and most of the ethernet driver runs in a thread so this
inherently none real time code will not affect real time code.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]