This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: posted dsr may get lost? under CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Brij Bihari Pandey <fuzzhead012 at yahoo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 15 May 2003 10:44:06 +0100
- Subject: Re: [ECOS] posted dsr may get lost? under CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
- References: <20030514143256.75349.qmail@web21001.mail.yahoo.com>
Brij Bihari Pandey <fuzzhead012@yahoo.com> writes:
> hi,
>
> In packages/kernel/current/src/int/intr.cxx something caught my attention in
> post_dsr function.
>
> #ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE
> 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