This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: dynamic allocation of memory during driver initialization?
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Grant Edwards <grante at visi dot com>
- Cc: Jay Foster <jay dot foster at systech dot com>,eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 08 Aug 2003 14:56:02 -0600
- Subject: Re: [ECOS] dynamic allocation of memory during driver initialization?
- Organization: MLB Associates
- References: <80B97DE95AEED311BA580050047FE98494F67A@mail.systech.com> <20030808154933.A11610@visi.com>
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