[ECOS] posted dsr may get lost? under CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE

Brij Bihari Pandey fuzzhead012@yahoo.com
Wed May 14 14:32:00 GMT 2003


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

 


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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