Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/06/04 13:32
Read: times


 
#82598 - emphasis
Responding to: ???'s previous message
Michael wrote:
You have to use great care in sharing subroutines between the mainline program flow and the interrupt thread

I would say the same, but stronger:
You have to use extreme care in sharing subroutines between the mainline program flow and the interrupt thread.

Sometimes it may be useful to duplicate the function so that there are two copies...one for mainline and one for interrupt.
In my opinion: the best (only good?) approach.

In cases where I need the same routine at int as well as main level, I usually write most of it as a macro to save the bugmaker of "change needed in two places"

Erik




List of 19 messages in thread
TopicAuthorDate
89s52 function sharing.            01/01/70 00:00      
   Try This            01/01/70 00:00      
      emphasis            01/01/70 00:00      
         an idea...            01/01/70 00:00      
            Andy, I tried it            01/01/70 00:00      
               Jolly good!            01/01/70 00:00      
            Error            01/01/70 00:00      
               You need to work on it            01/01/70 00:00      
   reentrant ?            01/01/70 00:00      
      reentrant            01/01/70 00:00      
   non-reentrant            01/01/70 00:00      
   Wow            01/01/70 00:00      
   varaible sharing?            01/01/70 00:00      
      Variable sharing            01/01/70 00:00      
      Overflow            01/01/70 00:00      
      variables, main and ISR            01/01/70 00:00      
         Globals use more memory            01/01/70 00:00      
      Isn't that a global?            01/01/70 00:00      
         Globals, ISRs, main, & static            01/01/70 00:00      

Back to Subject List