public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Interrupts and system calls ?
@ 2003-10-01 13:33 Matthieu.GIRARDIN
  2003-10-01 14:44 ` Eric Doenges
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu.GIRARDIN @ 2003-10-01 13:33 UTC (permalink / raw)
  To: ecos-discuss

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 ?

Thanks by advance.


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

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

* Re: [ECOS] Interrupts and system calls ?
  2003-10-01 13:33 [ECOS] Interrupts and system calls ? Matthieu.GIRARDIN
@ 2003-10-01 14:44 ` Eric Doenges
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Doenges @ 2003-10-01 14:44 UTC (permalink / raw)
  To: Matthieu.GIRARDIN; +Cc: ecos-discuss

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

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

end of thread, other threads:[~2003-10-01 14:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01 13:33 [ECOS] Interrupts and system calls ? Matthieu.GIRARDIN
2003-10-01 14:44 ` Eric Doenges

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).