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: dynamic allocation of memory during driver initialization?


On Fri, 2003-08-08 at 14:49, Grant Edwards wrote:
> On Fri, Aug 08, 2003 at 01:31:41PM -0700, Jay Foster wrote:
> 
> > One possiblity might be to do this from the device lookup()
> > function that is called from cyg_io_lookup().
> 
> That's what we're doing now.  It works as long as the lookup()
> is performed before interrupts are enabled and the device
> operation starts.  If interrupts are enabled before the first
> lookup() call, then the DSRs break because there are no buffers
> allocated.  I could add code to the DSRs to check to see if the
> buffers have been allocated, and discard the data if they
> haven't, but I was hoping to avoid make the DSRs any longer.

It would seem wrong to me to have the device generating and/or
handling interrupts before any "lookup" has been done.  Normally
one doesn't enable interrupts to a device until there is some
process (thread, whatever) ready to utilize the device.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
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]