[ECOS] posted dsr may get lost? under CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE

Nick Garnett nickg@ecoscentric.com
Thu May 15 12:06:00 GMT 2003

Brij Bihari Pandey <fuzzhead012@yahoo.com> writes:

> hi,
> In packages/kernel/current/src/int/intr.cxx something caught my attention in
> post_dsr function.
>      dsr_table[cpu][dsr_table_tail[cpu]++] = this;
>      if( dsr_table_tail[cpu] >= CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE )
>          dsr_table_tail[cpu] = 0;
> #endif
> The code doesn't seem to be doing check for if the queue is full or not i.e. no
> comparison on head and tail before adding new items in the queue.
> what if large number of dsr get posted, rather than user being made aware of
> the fact that he has to increase the value of
> CYGNUM_KERNEL_INTERRUPTS_DSRS_TABLE_SIZE, some of the earlier posted dsr will
> be silently overwritten in the table and will get lost.
> am i missing anything here?
> brij

The idea with the table version was that the table should be large
enough to cope with the maximum number of DSRs. It was added at the
very beginning when the expectation was that DSRs would be a lot less
frequent than ISRs, so there would only ever be a small number
outstanding, and the time to the next would be long. As it happens
this has not been the case, we get a DSR for each ISR in all the
serial and ethernet drivers.

Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list