This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: malloc/new in DSRs
- From: Gary Thomas <gary at chez-thomas dot org>
- To: George Sosnowski <george at stratalight dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 11 Jul 2002 15:18:03 -0600
- Subject: Re: [ECOS] malloc/new in DSRs
- References: <F626113795D3EB4482E5ACFBD93465121361A4@mailhost.stratalight.com>
On Thu, 2002-07-11 at 15:04, George Sosnowski wrote:
> If malloc is configed to be threadsafe in ecos.ecc, then is it ok to use
> malloc/new/free/delete in DSRs?
> I assume it is, but want to make sure.
I would not think so. DSR's are not allowed to "block" and if
you got into the DSR while inside some thread-safe protected code
(i.e. protected by a semaphore or mutex), it might try to.
Calling malloc() and friends from DSR code is normally considered poor
practice anyway. Why would you think you need to?
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss