This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: How DSR is executed in interrupt ?
- From: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- To: "'ecos-discuss'" <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 11 Sep 2007 22:14:37 -0700
- Subject: RE: [ECOS] How DSR is executed in interrupt ?
> From: ariga masahiro
>
> I am especially dubious whether it is correctly called.
> My next dubious point is that argument cpd->interrupt is
> used as eCos Vector-Table refence pointer.Is it correct to
> pass the same
> number to cyg_drv_interrupt_mask ? But I am sorry I can't fathom it yet.
>
> -- my ISR routine is below
> lan91cxx_isr(cyg_vector_t vector, cyg_addrword_t data
> /* , HAL_SavedRegisters *regs */ )
> {
> struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
> struct lan91cxx_priv_data *cpd =
> (struct lan91cxx_priv_data *)sc->driver_private;
>
> DEBUG_FUNCTION();
>
> INCR_STAT( interrupts );
>
> //20070903
> diag_printf("ISR int=%d\n",cpd->interrupt);
>
> cyg_drv_interrupt_mask(cpd->interrupt);
> cyg_drv_interrupt_acknowledge(cpd->interrupt);
> return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR); // Run the DSR }
The "vector" parameter is the interrupt vector number, so I don't see any
reason for wasting time casting "data" and following the chain to the
"interrupt" member.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss