[ECOS] Interrupts and system calls ?

Eric Doenges Eric.Doenges@DynaPel.com
Wed Oct 1 14:44:00 GMT 2003


Matthieu.GIRARDIN@fr.thalesgroup.com wrote:
> Hi everybody !
> 
> Can someone describe me exactly what are the system calls allowed during (a
> ISR or) a DSR ?
> I know that I can only use the cpu registers during the ISR but what can I
> do in my DSRs ?

According to the documentation, you may not call any routine that could
trigger the scheduler in an ISR. While not explicitly forbidden, I would
also avoid calling any functions where it is not 100% clear if they are
reentrant or not (i.e. things like malloc()). If you adhere to the eCos
philosophy of doing all the actual work in the DSR, chances are you
won't need to call any functions in the ISR.

In a DSR, you may call any function except those that could block.
I don't think there is a definitive list of what functions could block.
Use some common sense - for instance, any function that does device I/O
could potentially block on full/empty buffers. For example, calling
printf() in a DSR occasionally leads to crashes on my target platform.
-- 
--------------------------------------------------------------------
|     Eric Doenges              |     DynaPel Laboratories GmbH    |
|     Tel: +49 89 962428 23     |     Fraunhoferstrasse 9/2        |
|     Fax: +49 89 962428 90     |     D - 85737 Ismaning, Germany  |
--------------------------------------------------------------------


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



More information about the Ecos-discuss mailing list