public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Making driver interruptable
@ 2004-08-23 16:28 Samie Hassan Ghauri
  2004-08-24  7:45 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Samie Hassan Ghauri @ 2004-08-23 16:28 UTC (permalink / raw)
  To: ecos-discuss

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???

Samie

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Making driver interruptable
  2004-08-23 16:28 [ECOS] Making driver interruptable Samie Hassan Ghauri
@ 2004-08-24  7:45 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2004-08-24  7:45 UTC (permalink / raw)
  To: Samie Hassan Ghauri; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-24  7:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-23 16:28 [ECOS] Making driver interruptable Samie Hassan Ghauri
2004-08-24  7:45 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).