This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Making driver interruptable
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Samie Hassan Ghauri <samiehg at hotmail dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 24 Aug 2004 09:45:12 +0200
- Subject: Re: [ECOS] Making driver interruptable
- References: <BAY12-F26xWvR1aDeAY0006dbc5@hotmail.com>
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