public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] [SMP]serious bug in synchronisation primitives
       [not found] <417F9890.7080209@yahoo.com>
@ 2004-10-27 17:19 ` sandeep
  0 siblings, 0 replies; only message in thread
From: sandeep @ 2004-10-27 17:19 UTC (permalink / raw)
  To: sandeep; +Cc: ecos-devel, ecos-discuss

A quick solution (for time being) that can take care of majority (haven't looked 
if it will take care of all the situations) of problem situations, would be to 
do CYG_KERNEL_CPU_THIS() involving array accesses in simple inline accessor 
functions in sched.hxx under disable---restore interrupts protection, to ensure 
that invoking thread does not get scheduled out in middle of it.

however it is a costly solution, considering that these inlines would be called 
quite often. if possible, better solutions would be preferrable.

in case we go with disable--restore model to handle the problem in global way, 
could it be possible to have slightly separate names macros for 
disabling--restoring the interrupts here?

considering the SMP HAL i have worked with so far, i would prefer using slightly 
tweaked versions/ asm-inlines if needed, that reduce the instructions involved 
in the process as compared to normal DISABLE-RESTORE, taking advantage of the 
fact that I need to do it for a very small section of code, for a small time and 
that no switching etc. will be happening during it.

if modifications were to be done in HAL, would have done by now. would avoid 
making modifications in non-HAL code as far as possible, to make it convenient 
to keep in sync with regular eCos cvs.

as one colleague mentioned, this could be possibly last stumbling block in 
getting a stable SMP eCos on SOC architecture we have worked upon.

comments/feedbacks awaited.

sandeep

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-27 17:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <417F9890.7080209@yahoo.com>
2004-10-27 17:19 ` [ECOS] [SMP]serious bug in synchronisation primitives sandeep

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).