This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

posted dsr may get lost? under CYGIMP_KERNEL_INTERRUPTS_DSRS_TABLE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]