Daron Chabot daron.chabot at usask.ca
Tue Mar 20 16:50:02 UTC 2007

On Tue, 2007-03-20 at 10:03 -0500, Eric Norum wrote:
> On Mar 20, 2007, at 8:34 AM, Chris Xenophontos wrote:
> > All, thanks for the suggestions-
> >
> > The interrupt is a continuous interrupt source, does not need re- 
> > enabling.
> > It is ack'ed in the ISR upon entry, and the H/W regs are being  
> > loaded into
> > global variables.
> >
> > Almost appears to be a point at which, during execution of the  
> > task, that
> > release of a semaphore does not register.  Again, this is once in  
> > about 4-10
> > hours, with interrupt being generated every 3.001 seconds.
> >
> > I am going to start with a simple fix first, i.e, using a counting
> > semaphore, as L. Pollak indicated -
>   Be very careful with this since you're using shared variables to  
> transfer data between the ISR and the task........the interrupt  
> handler might overwrite the data before the task can get at all or  
> part of it.  The message queue approach avoids this problem.
> I am concerned that you may have uncovered a more serious problem.
> I don't have time to go through the semaphore code with a fine  
> toothed comb and check that there are no possible race conditions --  
> maybe Joel can do this when he gets back from Europe.  Or perhaps  
> Daron can do this for us???

I'm fairly swamped at "work" right now, but I will have a look through
the semaphore code this evening, if I get time. 

It can't hurt to throw as many sets of eyes as possible at such an
important component...

-- dc

More information about the users mailing list