This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Blocking calls in DSRs
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Richard Rauch <Richard dot Rauch at vipa dot de>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Fri, 20 Aug 2004 16:28:46 +0200
- Subject: Re: [ECOS] Blocking calls in DSRs
- References: <003001c486c0$53f207f0$408010ac@leo>
On Fri, Aug 20, 2004 at 04:16:46PM +0200, Richard Rauch wrote:
> Hi all,
>
> Is it allowed to call blocking eCos functions from DSR?
> I wrote a communication handler. This allocates a buffer from a memory pool,
> fills it with the telegram data and post it to a task. But if there are no
> buffers available the DSR would block.
You are not allowed to block. If you are using a memory pool you can
do an none blocking get, ie cyg_mempool_var_try_alloc. If this fails
our pool is full and you have to discard your comminication.
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