??? 01/08/07 18:50 Read: times |
#130450 - Side effects Responding to: ???'s previous message |
The cure could be worse than the disease.
Let use say the compiler disables interupts to make an operation atomic "automaticlly". Now it must keep track of other disables as not to screw up the state. Now you can debug lost pulses to to the compiler. But you know the code / hardware will never let it interfere. Now what to disable all interupts, one or two of them? Maybe a bit flag as a semiphore is better. which to use? how to tell the compiler leave it alone I have this one? Plus the compiler only sees one module at a time. Will this mess up other modules. The devil is in the details. Plus it can never be ANSI. It is too hardware specific. ANSI does not even support interupts. It would be a compiler by compiler deal. |