Return to Website   
Quantum Leaps Discussion Forum

Search the Forum for answers or post your questions to the
Quantum Leaps community



Return to Website

  Reply
  Forum

Subject:   Re: New port questions
Name:   Mike
Date Posted:   Apr 18, 08 - 11:53 AM
Email:   delsauce@hotmail.com
Message:   Thanks for the quick reply, Miro. I had overlooked your point about the race condition in my initial implementation. On further investigation of the reference manual for my particular Coldfire part I found this passage:

"Unlike the M68000 family, all ColdFire processors guarantee that the first instruction of the service routine
is executed before sampling for interrupts is resumed. By making this initial instruction a load of the SR,
interrupts can be safely disabled if required."

If I code the QK_ISR_ENTRY() macro to have the first insruction set the status register interrupt level to 7 (masking all ints below this level) I think that should prevent any other interrupts (except processor exceptions) from firing while I increase QK_intNest_ variable.

All Coldfire parts with that support the ISA_A+ or ISA_C instuction sets have the STLDSA instruction that stores the current status register value on the stack and loads it with a new value. This might be the way to go, but I need to do a little more investigation.

One question, is the QK_intNest_ variable used to determine when to call the scheduler (i.e. only when it is 0)? Does it have other uses?

Mike
Replies:    
Re: New port questions by Mike · Apr 18, 08 - 2:33 PM
Re: New port questions by Miro Samek · Apr 19, 08 - 7:56 AM
Re: New port questions by mike · Apr 20, 08 - 7:35 PM


  Reply
  Forum


powered by Powered by Bravenet bravenet.com