This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: malloc/new in DSRs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]